[Zope] Photo product: how to recreate thumbnails with Imagemagick
Ron Bickers
rbickers-dated-1004652421.786eef@logicetc.com
Thu, 25 Oct 2001 18:07:01 -0400
> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
> Timothy Wilson
> Now the question, can I force Zope to create new version of these
> thumbnails
> using Imagemagick without recreating all of them from scratch?
If you don't have too many Photos, you can go into each one and change the
engine to 'ImageMagick' and then go into the displays and select "Regenerate
All".
If you have too many for that, you could create a Python Script to iterate
through them, calling manage_changeProperties() to change the engine and
manage_regenDisplays() to regenerate them. If you're using the latest
version, that might go something like this (untested):
for photo in context.objectValues(['Photo']):
photo.propertysheets.get('photoconf').manage_changeProperties(engine='ImageM
agick')
photo.manage_regenDisplays()
This may take a while to run if you have a lot of images, but as you've
seen, it's worth it. In fact, I've made ImageMagick the default engine in
the latest version because of its superior quality.
Enjoy!
_______________________
Ron Bickers
Logic Etc, Inc.