[Image-SIG] Bug in the mode recognition code of Image.fromarray?

Christopher Barker Chris.Barker at noaa.gov
Mon Jan 12 18:12:52 CET 2009

Zhang Chiyuan wrote:
> it seems that when ndim is 4, the mode is set to RGBA. I'm not familiar with
> the various image modes. However, I think it should be that shape[-1] == 4
> instead of ndim == 4. And the same thing holds for 'RGB' and == 3.

at first glance, I think you are correct. however, this sounds familiar, 
so it may have been already fixed (or a fixed posted here -- I don't 
know if it was applied)

You might want to post this question to the numpy list -- that code was 
written by the numpy folks.


Christopher Barker, Ph.D.

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov

More information about the Image-SIG mailing list