[Zope] Image management in Zope

Max M maxm@mxm.dk
Tue, 11 Mar 2003 23:09:24 +0100


Jens JB. Bjerre wrote:

>I would like to make a site, where the user can upload an image in any
>size. The site then have to convert the image to jpg or another
>optimized format. After that I would like to be able to display the
>picture in a form of shop-system, in different sizes. I have been
>looking at the Photo product, and it seems like it is close. I just
>can't see how I convert the image upon upload.
>

You will need to use a third party tool for that:

I believe that the most prominent ones are:

-------------------------------------
PIL (Python Image Library)
http://www.pythonware.com/products/pil/

supported formats are:
http://www.pythonware.com/library/pil/handbook/image-file-formats.htm

I have used PIL, both standalone from Python, and under Zope. It's nice 
software and hasn't caused me any problems.

-------------------------------------
Pythonmagick
http://pythonmagick.procoders.net/
Which is a python interface for Imagemagick

It seems to support more formats than PIL, but I have never tried it.
http://www.imagemagick.org/www/formats.html

For the simple task you need to do, you probably don't even need a 
Python module. You could just call Imagemagick via popen or something 
similar and make it do the conversion.

regards Max M

(Rart at se andre danske Zopebrugere)