[Image-SIG] More on QuickBird Tiffs

K Schutte schutte@fel.tno.nl
Wed, 20 Nov 2002 08:52:34 +0100


I see two problem areas:

- the image file has 16 bit samples, and standard PIL doesn't like that
- there are 4 samples per pixel; PIL (probably) only likes 1 (grayscale) or 3
(RGB)

PIL based solution (probably requires coding):

- make PIL handle 16 bit unsigned integer TIFFs (see my patches of yesterday)
- make PIL read each color plane at a time, and combine later to RGB, or
- make PIL ignore the fourth color plane (if current PIL can handle separate
image planes.)

Good luck,

Klamer

PS: trying to convert to 'standard' formats with 'standard' utilities will not
    work, as there are few 'standard' utilities which properly support 16 bit
    unsigned integers as pixel type...

Joel Lawhead wrote:
> 
> Here's the output from tiffinfo on the QuickBird GeoTiff I'm trying to
> work with in PIL. Does anyone see anything that would stump PIL? I've
> tried opening the image using PIL 1.1.2 through 1.1.4a1. I currently
> have 1.1.4a1 installed on a Windows 2000 Pro machine with Python 2.2.
> Everything seems to work fine but these GeoTiffs from Digital Globe.  I
> think the planar configuration may not be typical. Does PIL support
> separate plane tiffs?
> 
> TIFF Directory at offset 0x8000018
>   Image Width: 4096 Image Length: 4096
>   Bits/Sample: 16
>   Sample Format: unsigned integer
>   Compression Scheme: None
>   Photometric Interpretation: RGB color
>   Extra Samples: 1<unspecified>
>   Date & Time: "2002:04:18 17:49:41"
>   Copyright: "(C) COPYRIGHT 2002 EarthWatch Incorporated, Longmont CO
> USA 80501-6700"
>   Image Description: "{\n  bandList = \n  [\n    1;\n    2;\n    3;\n
> 4;\n  ]\n}"
>   Orientation: row 0 top, col 0 lhs
>   Samples/Pixel: 4
>   Rows/Strip: 128
>   Planar Configuration: separate image planes
> 
> Thanks,
> Joel
> 
> _______________________________________________
> Image-SIG maillist  -  Image-SIG@python.org
> http://mail.python.org/mailman/listinfo/image-sig

-- 
Klamer Schutte, E-mail: Schutte@fel.tno.nl
Electro-Optical Systems, TNO Physics and Electronics Laboratory
Tel: +31-70-3740469 -- Fax: +31-70-3740654 -- Mobile: +31-6-51316671