[Numpy-discussion] import 16-bit tiff - byte-order problem?

2008-11-06 Thread Angus McMorland
Hi all, I'm trying to import a 16-bit tiff image into a numpy array. I have found, using google, suggestions to do the following: After starting with: i = Image.open('16bitGreyscaleImage.tif') Stéfan van der Walt suggested: a = np.array(i.getdata()).reshape(i.size) # a 1d numpy array and adap

Re: [Numpy-discussion] import 16-bit tiff - byte-order problem?

2008-11-06 Thread Angus McMorland
2008/11/6 Robert Kern <[EMAIL PROTECTED]>: > On Thu, Nov 6, 2008 at 21:54, Angus McMorland <[EMAIL PROTECTED]> wrote: >> Hi all, >> >> I'm trying to import a 16-bit tiff image into a numpy array. I have >> found, using google, suggestions to do the following: >> >> After starting with: >> i = Image

Re: [Numpy-discussion] import 16-bit tiff - byte-order problem?

2008-11-06 Thread Robert Kern
On Thu, Nov 6, 2008 at 21:54, Angus McMorland <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm trying to import a 16-bit tiff image into a numpy array. I have > found, using google, suggestions to do the following: > > After starting with: > i = Image.open('16bitGreyscaleImage.tif') > > Stéfan van der

Re: [Numpy-discussion] import 16-bit tiff - byte-order problem?

2008-11-07 Thread David Warde-Farley
On 6-Nov-08, at 11:15 PM, Angus McMorland wrote: > 2008/11/6 Robert Kern <[EMAIL PROTECTED]>: >> On Thu, Nov 6, 2008 at 21:54, Angus McMorland <[EMAIL PROTECTED]> >> wrote: >>> Hi all, >>> >>> I'm trying to import a 16-bit tiff image into a numpy array. I have >>> found, using google, suggestio

Re: [Numpy-discussion] import 16-bit tiff - byte-order problem?

2008-11-07 Thread Zachary Pincus
Hi, The PIL has some fundamental architectural problems that prevent it from dealing easily with 16-bit TIFFs, which are exacerbated on little- endian platforms. Add to this a thin sheen of various byte-order bugs and other problems in the __array_interface__, and it's really hard to get co