[Image-SIG] problem with numpy.asarray and PIL

Gary Capell gary.capell at gmail.com
Mon Jul 27 09:08:16 CEST 2009


I get this problem (with python2.6, PIL 1.1.6, numpy 1.3.0 )

>>> from PIL import Image
>>> import numpy
>>> i = Image.open('chart_bl.tif')
>>> a = numpy.asarray(i)
>>> o.size, a.shape
((13228, 18710), (18710, 13228))
>>> o.size, a.shape, a.dtype
((13228, 18710), (18710, 13228), dtype('bool'))
>>> numpy.histogram(a)
Segmentation fault

I'm very happy to send the offending image to anyone who is interested in
chasing this down: it is only 2.3KB as a .tif.bz2 file.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20090727/9674c829/attachment-0001.htm>


More information about the Image-SIG mailing list