Opened 14 years ago

Closed 9 years ago

#3697 closed defect (invalid)

An 1-bit Integraph CIT image shows as an 8-bit CIT image.

Reported by: gaopeng Owned by: warmerdam
Priority: high Milestone:
Component: GDAL_Raster Version: 1.6.2
Severity: normal Keywords: CIT
Cc:

Description

Other problems: displays blank, has an extra BW color map.

Attachments (1)

g04617.cit (320.4 KB ) - added by gaopeng 14 years ago.

Download all attachments as: .zip

Change History (4)

by gaopeng, 14 years ago

Attachment: g04617.cit added

comment:1 by warmerdam, 14 years ago

Priority: normalhigh
Status: newassigned

comment:2 by Jukka Rahkonen, 9 years ago

Checked with GDAL 2.0-dev. Result of gdalinfo:

Band 1 Block=22097x27923 Type=Byte, ColorInterp=Palette

Image Structure Metadata:

FORMAT=CCITT Group 4 NBITS=1 ORIENTATION=Lower Left Vertical TILED=NO

Color Table (RGB with 2 entries)

0: 255,255,255,255 1: 0,0,0,255

comment:3 by Jukka Rahkonen, 9 years ago

Resolution: invalid
Status: assignedclosed

Not a bug. Documentation about how 1-bit images are reported is missing but this test reveals how it goes:

Create a 1 bit image with ccittfax4 compression

gdal_translate -ot byte -co nbits=1 -co compress=ccittfax4 file1.tif fax.tif

Check gdalinfo:

Band 1 Block=1150x56 Type=Byte, ColorInterp=Palette
  NoData Value=nan
  Image Structure Metadata:
    NBITS=1
  Color Table (RGB with 2 entries)
    0: 0,0,0,255
    1: 255,255,255,255

Note: See TracTickets for help on using tickets.