<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=155165622-03022005><FONT face=Arial
size=2>Greetings,</FONT></SPAN></DIV>
<DIV><SPAN class=155165622-03022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=155165622-03022005><FONT face=Arial size=2>The (very) short
patch below corrects some issues I have had in PIL using the thumbnail method in
certain, admittedly pathological conditions. When aspect ratios are large
enough and one dimension is small enough, it is possible to get these lines to
go to zero and pass zeros through to draft().</FONT></SPAN></DIV>
<DIV><SPAN class=155165622-03022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=155165622-03022005><FONT face=Arial size=2>I'm not an expert on
the finer points of graphics processing, so this may not be the most correct
solution.</FONT></SPAN></DIV>
<DIV><SPAN class=155165622-03022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=155165622-03022005><FONT face=Arial
size=2>Regards,</FONT></SPAN></DIV>
<DIV><SPAN class=155165622-03022005><FONT face=Arial
size=2>Gene</FONT></SPAN></DIV>
<DIV><SPAN class=155165622-03022005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=155165622-03022005><FONT face=Arial size=2>---
Image.py.orig Thu Feb 3 17:42:43
2005<BR>+++ Image.py Thu Feb 3 17:32:40 2005<BR>@@
-1420,8 +1420,8 @@<BR> <BR>
# preserve aspect ratio<BR> x, y
= self.size<BR>- if x > size[0]: y
= y * size[0] / x; x = size[0]<BR>- if
y > size[1]: x = x * size[1] / y; y =
size[1]<BR>+ if x > size[0]: y = (y
* size[0] / x) or 1; x = size[0]<BR>+
if y > size[1]: x = (x * size[1] / y) or 1; y =
size[1]<BR> size = x,
y<BR> <BR> if size ==
self.size:<BR></FONT></SPAN></DIV></BODY></HTML>