[Zope] Photo enhancement
Gary Speer
gspeer@cortech.org
Wed, 17 Jul 2002 09:32:34 -0700
This is a multi-part message in MIME format.
------=_NextPart_000_00AB_01C22D74.E1C16780
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi Ron -=20
Did you happen to follow the thread in image-SIG about how to make Photo =
use the new Antialias filter in PIL 1.1.3? I know you prefer =
Imagemagik, but for us poor windoze folks that don't have a unix =
emulator, we are stuck with PIL. Anyway, Fredrick suggested adding the =
Antialias filter to the resize function in photo.py. I did and it works =
great. All of the generated images look 200% better!
Please consider adding to the next release or posting a note on your =
page.
It took a moment to figure out, but the syntax for using it is=20
im.resize((width,height),PIL.Image.ANTIALIAS)
Great product! I would love to see Photo work with ExternalFile's =
External Folder to batch read the source images on the file system and =
leave the image original (download version) at that location and have =
the option of sending the generated thumbnail there and all the other =
variations to the ExtFile folder - perhaps a checkbox next to the =
display sizes that indicates to save in the ExtFile folder under var or =
to save wherever the source was found (zodb or External folder).
Part of why I mention this is that the contents of ExtFile's folder =
could be cleared like a cache, no risk of deleting a source image, no =
need to back it up, and if a display image is missing it can be =
regenerated on the fly. This helps a migration to a new server as the =
ExtFile folder can be ignored and the source images remain in their =
original file system folder context. Whole trees of images can be put =
into the file system and then External Folder can batch traverse and =
Photo can intercept each Image that External Folder is adding and add it =
as a photo instead as it does now. I think its just a change in the =
object filter settings to trigger the process on either form of added =
image.
I really think this is worth a look because of the power of the image =
gallery that can be created and that maintainability is improved as =
whole branches of the directory tree are pruned and relocated. Simply =
refresh the metadata view of the file system via a traverse script that =
runs the external folder batch script and the new structure and all the =
displays are regenerated using settings acquired from the photo folder =
that is in the zodb portion of the path.
I'm very impressed with both products and see the potential of large =
scale commerce-grade applications if the import can be simplified.
On another subject, have you given any thought to pulling in the =
additional data fields in a jpeg typically written by digital cameras or =
captions and keyworks provided by image viewers as added properties of =
an imported photo? If not, are you aware of anyone having an =
enhancement or plugin for this? It seems like a straight forward loop =
through the properties that can be done when a photo is being added that =
has this extra data from the digital camera. I know I can spend time =
deconstructing the code to figure out where and how to add the =
attributes as each display onject is generated. I'm just wondering if =
you might already be thinking about this and know where the optimum =
insertion points might be to simply add all attributes found in the =
source file to each generated photo object. Please let me know your =
thoughts and suggestions.
Thank you,
Gary
------=_NextPart_000_00AB_01C22D74.E1C16780
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2716.2200" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi Ron - </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Did you happen to follow the thread in =
image-SIG=20
about how to make Photo use the new Antialias filter in PIL 1.1.3? =
I know=20
you prefer Imagemagik, but for us poor windoze folks that don't have a =
unix=20
emulator, we are stuck with PIL. Anyway, Fredrick suggested adding =
the=20
Antialias filter to the resize function in photo.py. I did and it =
works=20
great. All of the generated images look 200% better!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Please consider adding to the next =
release or=20
posting a note on your page.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>It took a moment to figure out, but the =
syntax for=20
using it is </FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>im.resize((width,height),PIL.Image.ANTIALIAS)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Great product! I would love to =
see Photo=20
work with ExternalFile's External Folder to batch read the source images =
on the=20
file system and leave the image original (download version) at that =
location and=20
have the option of sending the generated thumbnail there and all the =
other=20
variations to the ExtFile folder - perhaps a checkbox next to the =
display sizes=20
that indicates to save in the ExtFile folder under var or to save =
wherever the=20
source was found (zodb or External folder).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Part of why I mention this is that the =
contents of=20
ExtFile's folder could be cleared like a cache, no risk of deleting a =
source=20
image, no need to back it up, and if a display image is missing it can =
be=20
regenerated on the fly. This helps a migration to a new server as =
the=20
ExtFile folder can be ignored and the source images remain in their =
original=20
file system folder context. Whole trees of images can be put into =
the file=20
system and then External Folder can batch traverse and Photo can =
intercept each=20
Image that External Folder is adding and add it as a photo instead as it =
does=20
now. I think its just a change in the object filter settings to =
trigger=20
the process on either form of added image.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I really think this is worth a look =
because of the=20
power of the image gallery that can be created and that maintainability =
is=20
improved as whole branches of the directory tree are pruned and =
relocated. =20
Simply refresh the metadata view of the file system via a traverse =
script that=20
runs the external folder batch script and the new structure and all the =
displays=20
are regenerated using settings acquired from the photo folder that is in =
the=20
zodb portion of the path.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I'm very impressed with both products =
and see the=20
potential of large scale commerce-grade applications if the import can =
be=20
simplified.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>On another subject, have you given any =
thought to=20
pulling in the additional data fields in a jpeg typically written by =
digital=20
cameras or captions and keyworks provided by image viewers as added =
properties=20
of an imported photo? If not, are you aware of anyone having an=20
enhancement or plugin for this? It seems like a straight forward =
loop=20
through the properties that can be done when a photo is being added that =
has=20
this extra data from the digital camera. I know I can spend time=20
deconstructing the code to figure out where and how to add the =
attributes as=20
each display onject is generated. I'm just wondering if you =
might=20
already be thinking about this and know where the optimum insertion =
points might=20
be to simply add all attributes found in the source file to each =
generated photo=20
object. Please let me know your thoughts and =
suggestions.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thank you,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Gary</FONT></DIV></BODY></HTML>
------=_NextPart_000_00AB_01C22D74.E1C16780--