[PYTHON IMAGE-SIG] ImageChops bug?
Skip Montanaro
skip@calendar.com (Skip Montanaro)
Sat, 22 Mar 1997 10:42:28 -0500 (EST)
-----BEGIN PGP SIGNED MESSAGE-----
I tried taking the difference of two GIF images:
>>> im1 = Image.open('mapwireworld.gif')
>>> im2 = Image.open('mapwireworld.gif.GIF')
>>> diff = ImageChops.difference(im1, im2)
>>> Image._showxv(diff)
Traceback (innermost last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python1.4/Image.py", line 544, in _showxv
file = self.convert("RGB")._dump()
File "/usr/local/lib/python1.4/Image.py", line 181, in convert
im = self.im.convert(mode)
ValueError: No palette
>>>
Why no palette? The two original images are available at:
http://dolphin.automatrix.com/~skip/mapwireworld.gif
http://dolphin.automatrix.com/~skip/mapwireworld.gif.GIF
File says:
mapwireworld.gif: GIF picture - version 89a 599 x 455, 256 colors
mapwireworld.gif.GIF: GIF picture - version 87a 599 x 455, interlaced, 64 colors
If I convert them to RGB images before taking their difference, the
difference image displays fine. Seems like a bug in ImageChops.difference
or its underlying helper functions. (This is PIL 0.2b5, by the way.)
Thx,
- --
Skip Montanaro | Musi-Cal: http://concerts.calendar.com/
skip@calendar.com | What's your favorite programming language? Mine's
(518)372-5583 | Python: http://www.python.org/
-----BEGIN PGP SIGNATURE-----
Version: 2.6.2
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface
iQCVAwUBMzP94R+q0G630cGhAQEGVAP+NRbUaHYYyUHG5Qa5RsTyIyDKgl6DJclz
mUXjHN57yMTEmgtP3w/IDqgl1bK8eHAjcNW/rGvv/AjAaKKyRJCagv30HaYhLzMB
78hnG85jkjHD29Dbyx0XlG+5Dr7t7ZWYQTh2FdOvR7YMUs736avuQTGP5NzpKjyB
YlRNo2CuuH4=
=O3P3
-----END PGP SIGNATURE-----
_______________
IMAGE-SIG - SIG on Image Processing with Python
send messages to: image-sig@python.org
administrivia to: image-sig-request@python.org
_______________