[Image-SIG] Will 1.1.7 be true-division safe ?
Sebastian Haase
seb.haase at gmail.com
Wed May 27 10:52:46 CEST 2009
Hi,
short question: Since I usually like running Python with "python2.5
-Qnew" , I was wondering if patches were applied that substituted '/'
for '//' in some places were it appeared necessary ?
Some places I patches in my 1.1.6 version are:
PIL/GifImagePlugin.py: if not (chr(i//3) == p[i] ==
p[i+1] == p[i+2]):
PIL/TiffImagePlugin.py: count = count // 2 #
adjust for rational data field
PIL/TiffImagePlugin.py: palette = map(lambda a: chr(a
// 256), self.tag[COLORMAP])
PIL/TiffImagePlugin.py: palette = map(lambda a: chr(a
// 256), range(256))
PIL/TiffImagePlugin.py: #palette = map(lambda a: chr(a //
256), self.tag[COLORMAP])
PIL/TiffImagePlugin.py: stride = len(bits) * ((im.size[0]*bits[0]+7)//8)
PIL/XVThumbImagePlugin.py: PALETTE = PALETTE +
(chr((r*255)//7)+chr((g*255)//7)+chr((b*255)//3))
(These can of course be found using "python -Qwarn")
Thanks,
Sebastian Haase
More information about the Image-SIG
mailing list