> > I think the point here is that > > img = Image('foo.png') > imshow(img) > > and > > img = Image('foo.png') > imshow(asarray(img)) > > give different results, since matplotlib.image.pil_to_array functions > differently from what PIL exposes in __array_interface__ > > -- > Pauli Virtanen > >
I see. Thanks for clarifying this. And yes, I think this should be fixed. Hmm, it seems that somehow pil_to_array tries to make the image upside-down by itself. x_str = im.tostring('raw',im.mode,0,-1) However. I'm afraid that changing this behavior may not be ideal for backward-compatibility. I think one possible solution would be to simply deprecate the support for PIL image in imshow, and let users explicitly use array-interface via asarray function. Is there any other idea? I'll make this change unless someone come up with something. -JJ ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users