<!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>&nbsp;</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>&nbsp;</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.&nbsp; 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>&nbsp;</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>&nbsp;</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>&nbsp;</DIV>
<DIV><SPAN class=155165622-03022005><FONT face=Arial size=2>--- 
Image.py.orig&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thu Feb&nbsp; 3 17:42:43 
2005<BR>+++ Image.py&nbsp;&nbsp;&nbsp; Thu Feb&nbsp; 3 17:32:40 2005<BR>@@ 
-1420,8 +1420,8 @@<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
# preserve aspect ratio<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; x, y 
= self.size<BR>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if x &gt; size[0]: y 
= y * size[0] / x; x = size[0]<BR>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if 
y &gt; size[1]: x = x * size[1] / y; y = 
size[1]<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if x &gt; size[0]: y = (y 
* size[0] / x) or 1; x = size[0]<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
if y &gt; size[1]: x = (x * size[1] / y) or 1; y = 
size[1]<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; size = x, 
y<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if size == 
self.size:<BR></FONT></SPAN></DIV></BODY></HTML>