[Scipy-tickets] [SciPy] #1205: Converting PIL image to Scipy crashes Python

SciPy Trac scipy-tickets@scipy....
Mon Jun 21 04:45:07 CDT 2010

#1205: Converting PIL image to Scipy crashes Python
 Reporter:  jpa         |       Owner:  somebody
     Type:  defect      |      Status:  new     
 Priority:  normal      |   Milestone:  0.8.0   
Component:  scipy.misc  |     Version:  0.7.0   
 Keywords:              |  

Comment(by rgommers):

 The only difference between imread and asarray is that the former calls
 array(.., copy=True) while the latter uses array(.., copy=False). So it
 looks like numpy does somehow not like the memory layout of PIL (PIL still
 owns the memory with asarray). There are a huge number of known bugs in
 PIL 1.1.6 related to this, so upgrading may fix it for you. If not, it may
 be worth looking at numpy.array, but it's a lot less likely the bug is

 By the way, "a PNG bitmap" doesn't imply it's 1-bit, bitmap is a generic
 name for a raster (as opposed to vector) image.

Ticket URL: <http://projects.scipy.org/scipy/ticket/1205#comment:5>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.

More information about the Scipy-tickets mailing list