Opened 21 years ago

Last modified 21 years ago

#161 closed defect (fixed)

GDAL bug with black/white TIFF

Reported by: Markus Neteler Owned by: warmerdam
Priority: high Milestone:
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

Frank,

sorry for another bug report. Today I tried to import a TIFF/TFW
file: The TIFF driver seems to be confused with that format.

tiffinfo 0601020.tif
0601020.tif: Warning, unknown field with tag 33550 (0x830e) ignored.
0601020.tif: Warning, unknown field with tag 33922 (0x8482) ignored.
TIFF Directory at offset 0x8
  Subfile Type: (0 = 0x0)
  Image Width: 10393 Image Length: 9023
  Resolution: 400, 400 pixels/inch
  Bits/Sample: 1
  Compression Scheme: CCITT RLE
  Photometric Interpretation: min-is-white
  Software: "Arc/Info"
  Samples/Pixel: 1
  Rows/Strip: 7
  Planar Configuration: single image plane

gdal.velocet.ca/pub/incoming
0601020.tif
0601020.tfw
0601020_gdalbug.gif  <- screenshot (left GDAL, right XV)

Perhaps you could look into this.

Thanks

 Markus

Change History (3)

comment:1 by neteler@…, 21 years ago

Frank,

you may want to know how I compiled GDAL:

configure --without-python --without-grass --with-libtiff=internal
--with-geotiff=internal

Thanks,
Markus

comment:2 by warmerdam, 21 years ago

Markus, 

Thanks for the bug report and the file.  It seems that the bitmap is being
unpacked backwards within the byte.  I will dig into this. 

Best regards,

comment:3 by warmerdam, 21 years ago

Markus, 

The problem was that 1bit files have byte aligned scanlines and I wasn't
accounting for this.  I have corrected gdal/frmts/gtiff/geotiff.cpp and now
the files looks fine.

Thanks for submitting it!


Note: See TracTickets for help on using tickets.