Sun, 17 May 2009 00:15:48 -0400, Jae-Joon Lee wrote:
> On Sat, May 16, 2009 at 6:58 PM,
> <[email protected]> wrote:
>>
>> Hi,
>> I want to read images and do some processing with them. While learning
>> how to do this, i.e. opening images, displaying them, transforming them
>> tu numpy arrays, etc., I came across a strange behaviour. If I open an
>> image and use imshow() to display it, it comes upside down. See this
>> thread in the numpy mailing list for more details:
>> http://thread.gmane.org/gmane.comp.python.numeric.general/30148 .
>> Someone on that list suggested to check here if this behavior was
>> correct. Is it normal that the image appears upside down? If yes, can
>> someone explain what's going on?
>
> Note that the image may be upside down for you but may be correct for
> others. The array itself does not know about the orientation of the
> image and you have to explicitly specify this.
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
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users