[Image-SIG] Reversed X an Y when convering PIL images to NumPy arrays

Yury V. Zaytsev yury at shurup.com
Tue Apr 20 10:59:51 CEST 2010


On Mon, 2010-04-19 at 10:00 -0700, Christopher Barker wrote:

> you can just use (y,x) , or you can transpose the array:
> 
>  >     p = a.T.copy()

FYI, this will not work for anything that is not grayscale arrays. 
You need to use p = a.copy().transpose((1, 0, 2)).

Thanks again,
 
-- 
Sincerely yours,
Yury V. Zaytsev



More information about the Image-SIG mailing list