[REBOL] Image processing and embedding metadata in images?
From: jasonic::panix::com at: 12-Nov-2001 14:21
Developing an application which uses lots of images.
A REBOL/View program helps contributors upload content to Zope and Vanilla
sites.
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]
http://www.pythonware.com/products/pil/
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'
http://www.zope.org/Members/rbickers/Photo/Photo-1.2.2.tgz/README.txt
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>
etc
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!
Thanks
- Jason