[Zope] image processing site quidance...

Tino Wildenhain tino at wildenhain.de
Mon Feb 20 15:01:21 EST 2006


Nicolas Georgakopoulos schrieb:
> Hello Zopistas,
> 
> I need a little guidance for a site that must make image processing on
> the fly.
> Users should be able to upload image files and after some pixels
> manipulation they should see the image preview after the changes and
> download it.

You should be much more precise about what "some pixels manipulation"
actually means :-) Writing a drawing program is not so easy I think.
Maybe with more client side intelligence...

> I have installed PIL successfully for that reason (thanks to smiley
> Chris) so I can use it as an external method.

For more then just a single convert (even then) I'd write a complete
external product. Its much easier to test and install and can do more.

> I have thought to do this implementation uploading the file to the
> ZopeDB and change it there or should the file be uploaded in the local
> file system ?

Actually depends on what you want to do and what you want to do
after the changes. E.g. do you want to save a complete history
of the manipulation? Then I'd go ZODB completely. If you dont
want to save the image, I'd go tempfiles and pass the handles
to them around the SESSION. (see tempfile module)

Maybe a combination is apropriate.

> either way , what should I know so I can do that ?

You should experiment with PIL - maybe outside zope.
You should learn how to write a simple python based
product. You should read about ZODB programming so
not to read whole image objects at once.
For the history part, if you want that, look at the implementation
of OFS.History.

> thanks in advance.

Good luck :-)

--Tino


More information about the Zope mailing list