[REBOL] Re: Image processing and embedding metadata in images?
From: ryanc:iesco-dms at: 12-Nov-2001 12:28
I would rethink the whole approach. Data can be imprinted on gif, jpeg, png,
and bmp, and saved as a png or bmp using /View very easily, but forget about
swf. Could be done like so:
save/png %out.png to-image layout [image %image.jpg text "Posted by Ryan Cole"]
Generally though, I recommend referencing the metadata to the image, which
makes much more sense.
When you get into altering binaries, you basically need to be able to
understand the whole thing. With simple formats like bmp and gif, this is very
reasonable, but with more complex formats its a major endevour.
Jason Cunliffe wrote:
> Developing an application which uses lots of images.
> A REBOL/View program helps contributors upload content to Zope and Vanilla
> They will submit metadata along with images [jpeg, gif, png].
> Other binary formats like Flash5 [.swf] will be used.
> I want to embed a modest amount of metadata into the image itself.
> I am thinking this may be done in several ways:
> - using header or end-of-file space
> - adding a thin data strip along the top/bottom edge whose datavalues are
> parsed by client/server-side tools to generate a standard block.
> - ??
> Does anyone here have any experience with such?
> Specifically any advice for precise binary data manipulation of image
> formats in REBOL?
> I imagine there could be problems with embedding data in JPEG files, as it
> may get mabngled by compression settings.
> Python has a well-known library PIL [Python Imaging Library]
> Along with ImageMagic PIL is used in Zope products too for some very useful
> server-side image processing such as Zope 'Photo and Photo Folder'
> "Photo objects provide a way to manage various display sizes of an image.
> They are very similar to Zope Image objects but generate and store multiple
> copies of the image in different sizes. These sizes are configurable for
> each Photo."
> Thus one uploads an image once to the server, usually a large source file.
> The new Photo object's params list defines what alternate sizes are
> generated. This takes processing time, but the result is a family of images
> sizes which can be called immediately by simple URL variations:
> <a href="http://localhost/myphoto.jpg/view?display=small">thumbnail</a>
> <a href="http://localhost/myphoto.jpg/view?display=medium">medium</a>
> <a href="http://localhost/myphoto.jpg/view?display=large">large</a>
> <a href="http://localhost/myphoto.jpg/view?display=full">full</a>
> Wondering what the REBOL / VANILLA equivalent is..?
> For server side tasks, we can use Python/PIL + REBOL, but am hoping for a
> more symetrical, lower-profile solution. In general, moving over from
> Python/Zope to REBOL/Vanilla.. It's more fun!
> - Jason
> To unsubscribe from this list, please send an email to
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.
The contradiction so puzzling to the ordinary way
of thinking comes from the fact that we have to use
language to communicate our inner experience
which in its very nature transcends lingistics.