[gdal-dev] 16 bit / px / band TIFFs unreadable by ImageMagick, others

Nissim Chudnoff nissim.chudnoff.ctr at metnet.navy.mil
Fri Mar 21 17:22:10 EDT 2008


Frank,

> 1) It's tiled.  Some programs still don't support tiled tiff files.

These are supported by IM, GS and IV, so I don't think it's a problem,
same with INTERLEAVE=band or pixel.

> 2) It's 16bit.  Lots of programs don't support 16bit tiff files.
I can't vouch for GeoServer/GeoTools, but IrfanView and ImageMagick have
no problems with the 16 bit/band RGB or grayscale images in the libtiff
test suite, so I'm not sure this is what's wrong.

> 3) It uses only a fraction of the 16bit dynamic range.  Lots of programs
>    that *can* read 16bit assume the image is full dynamic range (values
>    from 0 to 65535 so your image in the 0 to 1000 range (roughly) will
end
>    up getting shown as black and slightly off black.

That's just it -- that image isn't just black/off black. If you use
"gdal_translate -scale -ot Byte" to produce an 8-bit version of it, you'll
see land features, river and ocean (in many pretty colors, not just
grayscale), and the file opens Ok in all the various software.

Obviously I can just go ahead and use the 8-bit images for our
application, but I was curious if anyone knew more about this, if it was a
bug/feature, gotten it to work, etc.

-Nissim

-----Original Message-----
From: Frank Warmerdam [mailto:warmerdam at pobox.com]
Sent: Friday, March 21, 2008 2:03 PM
To: nissim.chudnoff.ctr at metnet.navy.mil
Cc: gdal-dev at lists.osgeo.org
Subject: Re: [gdal-dev] 16 bit / px / band TIFFs unreadable by
ImageMagick, others


Nissim Chudnoff wrote:
> Hello all,
>
> I've been having odd issues using GeoTIFFs made with GDAL that have 16
> bits per band RGB data. These images can be read by some software
> (GDAL,
> OpenEV) but not others (ImageMagick, GeoServer, IrfanView), so I can't
> tell if there's some problem with the file such that only GDAL works
right
> (IIRC, OpenEV uses GDAL) or just that everyone else has crappy support
of
> such files. Here's the commandline I used to generate the GeoTIFF:

Nissim,

I'm not clear in what way ImageMagick, GeoServer and IrfanView fail to
read the file in question.  I looked at it and it does not seem particular
odd.

Things that will reduce the number of programs supporting it:

>  1) It's tiled.  Some programs still don't support tiled tiff files.

  2) It's 16bit.  Lots of programs don't support 16bit tiff files.

  3) It uses only a fraction of the 16bit dynamic range.  Lots of programs
     that *can* read 16bit assume the image is full dynamic range (values
     from 0 to 65535 so your image in the 0 to 1000 range (roughly) will
end
     up getting shown as black and slightly off black.

Images not intended for remote sensing images are unlikely to display the
image in question nicely but I don't see anything really wrong with it.

Best regards,
--
---------------------------------------+--------------------------------
---------------------------------------+------
I set the clouds in motion - turn up   | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4075 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20080321/16e11b92/smime-0001.bin


More information about the gdal-dev mailing list