Le jeudi 16 avril 2015, oyster a écrit :
> Firstly, thanks, Fabrice Silva
> 
> I have checked my picture files again.
> 
> For python-gray.png, now it is attacched here or can be downloaded
> from 
> http://bbs.blendercn.org/data/attachment/forum/201504/16/222351w3952n3o9968m9a5.png.
> xnview says it is 128*128*8, but  "print
> imread('python-gray.png').shape" says (128, 128, 3), however I suppose
> it should be (128, 128)!

Funnily (or not), the png is in fact 8-bits depth so you could infer it
is grayscale, but matplotlib is right : your file uses a color palette.
The 8-bits values refer to indices of the 256-length color palette.
These indices are then converted back to the colorspace, so the shape is
eventually (...,3). Unfortunately, the color palette is here the
grayscale...


-- 
Fabrice


------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to