[Scipy-tickets] [SciPy] #1781: scipy.misc.toimage (and therefore imresize) converts to uint32 when it should convert to int32

SciPy Trac scipy-tickets@scipy....
Wed Nov 28 18:19:11 CST 2012


#1781: scipy.misc.toimage (and therefore imresize) converts to uint32 when it
should convert to int32
-----------------------------------------+----------------------------------
 Reporter:  ecuzzillo                    |       Owner:  somebody   
     Type:  defect                       |      Status:  new        
 Priority:  normal                       |   Milestone:  Unscheduled
Component:  scipy.misc                   |     Version:  0.11.0     
 Keywords:  imresize, pil mode, pilutil  |  
-----------------------------------------+----------------------------------
 Line 247 of scipy/misc/pilutil.py reads

 data32 = data.astype(numpy.uint32)

 and should read

 data32 = data.astype(numpy.int32)

 because http://www.pythonware.com/library/pil/handbook/concepts.htm

 says 'I' means SIGNED integers.

 This caused a fair amount of consternation.

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


More information about the Scipy-tickets mailing list