[cgkit-commits] cgkit2/cgkit stitch.py,1.1,1.2
Brought to you by:
mbaas
From: Matthias B. <mb...@us...> - 2005-10-07 15:48:12
|
Update of /cvsroot/cgkit/cgkit2/cgkit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21212/cgkit Modified Files: stitch.py Log Message: Check for zero width/height Index: stitch.py =================================================================== RCS file: /cvsroot/cgkit/cgkit2/cgkit/stitch.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** stitch.py 4 Oct 2005 15:58:35 -0000 1.1 --- stitch.py 7 Oct 2005 15:48:04 -0000 1.2 *************** *** 102,105 **** --- 102,109 ---- width, height = tileimg.size x1,x2,y1,y2 = coords + if (x2-x1)==0 or (y2-y1)==0: + if infostream!=None: + print >>infostream, "%s: Warning: Zero width/height."%tilename + continue xr = int(width/(x2-x1)) yr = int(height/(y2-y1)) |