[Image-SIG] how to read tif image

Nadav Horesh nadavh at visionsense.com
Mon Oct 22 07:59:28 CEST 2007


I did use PIL to read/write 16 bit images (could be also 32 bits, but I am not sure)

 Nadav.

-----Original Message-----
From: image-sig-bounces at python.org on behalf of W. Bryan Smith
Sent: Wed 17-Oct-07 16:45
To: B.R.ten_Broeke at lumc.nl
Cc: Image-SIG at python.org
Subject: Re: [Image-SIG] how to read tif image
 
if i remember correctly, pil doesn't deal with 16-bit tif.  i think there
was a patch
around or something.... anyone have the info on this?  tif does have a very
specific header, including an offset (in bytes) to the image pixels, so it
should
be pretty easy to use a binary read operation to get your pixels.

On 10/11/07, B.R.ten_Broeke at lumc.nl <B.R.ten_Broeke at lumc.nl> wrote:
>
>  Hello,
>
>
>
> How do I read a (I;16) TIFF image with PIL?
>
> If I use the basic code:
>
>             im = Image.open("file.tif")
>
>             im.show()
>
> My output is a white screen. If I open the image with ImageJ, I have no
> problems.
>
>
>
> Any suggestions?
>
> Thanx in advance.
>
>
>
> Bradley
>
> _______________________________________________
> Image-SIG maillist  -  Image-SIG at python.org
> http://mail.python.org/mailman/listinfo/image-sig
>
>



More information about the Image-SIG mailing list