[Numpy-discussion] asarray() and PIL
Stéfan van der Walt
Wed May 27 10:19:20 CDT 2009
2009/5/27 cp <email@example.com>:
> This means that the array-image has 1600 color channels, 1900 image pixel rows
> and 3 image pixel columns. Why is that?
No, it means that you have 1600 rows, 1900 columns and 3 colour channels.
> if I reshape with
> will there be a mix-up in pixel values and coordinates when compared to the
> initial PIL image?
You'll have to use np.rollaxis(img, -1) to get the shape you want.
More information about the Numpy-discussion