Dear all,

For some reason I have a problem converting a specific png image using
array().

Here is what I am getting (using numpy 1.3.0 and scipy 0.7.0).

% wget http://files.getdropbox.com/u/167753/spiky_adj_023.png
% python -c "import numpy as np; import Image; print
np.array(Image.open('spiky_adj_023.png'))"
<PngImagePlugin.PngImageFile instance at 0xd1a050>

% wget http://files.getdropbox.com/u/167753/spiky_norm_001.png
% python -c "import numpy as np; import Image; print
np.array(Image.open('spiky_norm_001.png'))"
[[134  30 140 ..., 230  83  59]
 [ 99 202 233 ..., 160  63 133]
 [ 93 241  35 ...,   7 240 101]
 ...,
 [206 132 196 ..., 139 190 112]
 [218  21 217 ..., 121 152 109]
 [ 83 188 187 ...,   6 240 251]]


I was initially using scipy's misc.imread when I found this bug. I am
currently using the following workaround:
% python -c "import numpy as np; import Image; print
np.array(Image.open('spiky_adj_023.png').convert('RGB'))"

Let me know what you think.

Thanks in advance.

Sincerely,

-- 
Nicolas Pinto
Ph.D. Candidate, Brain & Computer Sciences
Massachusetts Institute of Technology, USA
http://web.mit.edu/pinto
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to