[NumPy-Tickets] [NumPy] #1179: bug using array with a PIL Image (misc.imread)

NumPy Trac numpy-tickets@scipy....
Thu Jul 29 17:09:19 CDT 2010


#1179: bug using array with a PIL Image (misc.imread)
------------------------+---------------------------------------------------
  Reporter:  nicopinto  |       Owner:  somebody   
      Type:  defect     |      Status:  closed     
  Priority:  normal     |   Milestone:  Unscheduled
 Component:  Other      |     Version:             
Resolution:  invalid    |    Keywords:             
------------------------+---------------------------------------------------
Changes (by pv):

  * status:  new => closed
  * resolution:  => invalid


Comment:

 It's a bug in PIL, nothing we can fix:
 {{{
 >>> Image.open('spiky_norm_001.png').__array_interface__.keys()
 ['shape', 'data', 'typestr']
 >>> Image.open('spiky_adj_023.png').__array_interface__.keys()
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/usr/lib/python2.6/dist-packages/PIL/Image.py", line 507, in
 __getattr__
     shape, typestr = _conv_type_shape(self)
   File "/usr/lib/python2.6/dist-packages/PIL/Image.py", line 221, in
 _conv_type_shape
     typ, extra = _MODE_CONV[im.mode]
 KeyError: 'LA'
 }}}

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1179#comment:5>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list