Re: [Numpy-discussion] asarray() and PIL

2009-05-27 Thread Christopher Barker
cp wrote: >>> arr=asarray(img) >>> arr.shape >>> (1600,1900,3) > >> No, it means that you have 1600 rows, 1900 columns and 3 colour channels. > > According to scipy documentation at > http://pages.physics.cornell.edu/~myers/teaching/ComputationalMethods/python/arrays.html > you are right. > > In

Re: [Numpy-discussion] asarray() and PIL

2009-05-27 Thread cp
> > arr=asarray(img) > > arr.shape > > (1600,1900,3) > No, it means that you have 1600 rows, 1900 columns and 3 colour channels. According to scipy documentation at http://pages.physics.cornell.edu/~myers/teaching/ComputationalMethods/python/arrays.html you are right. In this case I import numpy

Re: [Numpy-discussion] asarray() and PIL

2009-05-27 Thread Sebastian Haase
On Wed, May 27, 2009 at 5:12 PM, cp wrote: > Hi, > I'm using PIL for image processing, but lately I also try numpy for the > flexibility and superior speed it offers. The first thing I noticed is that > for > an RGB image with height=1600 and width=1900 while > > img=Image.open('something.tif') >

Re: [Numpy-discussion] asarray() and PIL

2009-05-27 Thread Stéfan van der Walt
2009/5/27 cp : > img=Image.open('something.tif') > img.size > (1900,1600) > > then > > arr=asarray(img) > arr.shape > (1600,1900,3) > > 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, 190

[Numpy-discussion] asarray() and PIL

2009-05-27 Thread cp
Hi, I'm using PIL for image processing, but lately I also try numpy for the flexibility and superior speed it offers. The first thing I noticed is that for an RGB image with height=1600 and width=1900 while img=Image.open('something.tif') img.size (1900,1600) then arr=asarray(img) arr.shape (160