AW: [gdal-dev] gdalwarp and GTiff creation option NBITS

Frank Warmerdam warmerdam at pobox.com
Tue Jun 15 10:33:32 EDT 2010


On Mon, Jun 14, 2010 at 11:06 AM, Fischer, Andreas
<Andreas.Fischer at kreis-unna.de> wrote:
> Hi Frank,
> thanks for your hints. I could finally use tiffinfo very easily from FWTools-Shell, for I'm testing with a windows machine :-)
...
> b) File transformed with gdalwarp (gdal-file)
>
> TIFFReadDirectory: Warning, Unknown field with tag 42113 (0xa481) encountered.
> TIFF Directory at offset 0x10a8036 (17465398)
>  Image Width: 11812 Image Length: 11812
>  Bits/Sample: 1
>  Sample Format: unsigned integer
>  Compression Scheme: None
>  Photometric Interpretation: palette color (RGB from colormap)
>  Samples/Pixel: 1
>  Rows/Strip: 5
>  Planar Configuration: single image plane
>  Color Map: (present)
>  Tag 42113: 255
>
>
> c) gdal-file (b) opened with IrfanView and saved as a copy without changes
>
> TIFF Directory at offset 0x10a35bc (17446332)
>  Image Width: 11812 Image Length: 11812
>  Resolution: 0, 0 pixels/inch
>  Bits/Sample: 1
>  Compression Scheme: None
>  Photometric Interpretation: min-is-white
>  Orientation: row 0 top, col 0 lhs
>  Samples/Pixel: 1
>  Rows/Strip: 5
>  Planar Configuration: single image plane
>  Software: IrfanView

Andreas,

The most obvious difference between these is that the GDAL
generated file has a color table while IrfanView does not save
one with it's 1 bit output file.  It would appear that some software
packages do not properly support paletted one bit files.

Unfortunately, because GDAL "sees" the min-is-white
input file as paletted it produces a paletted output file.  I
cannot think of an easy way of avoiding this.

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    | Geospatial Programmer for Rent


More information about the gdal-dev mailing list