Opened 13 years ago
Closed 13 years ago
#3835 closed defect (invalid)
multi-band 1-bit CCITT-compressed GeoTIFFs write incorrectly
Reported by: | osoong | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
I came across this originally using R and rgdal (based on GDAL 1.7.2), but it seems to affect gdal_translate (1.7.3). I'm attaching a test tif (2bands.tif), which is a 2-band 8-bit uncompressed GeoTIFF. I then run gdal_translate:
gdal_translate -of GTiff -ot Byte -co "NBITS=1" -co "COMPRESS=CCITTFAX4" 2bands.tif 2bandsfax4.tif
If I examine the input and output files in R using rgdal, I see that the two files differ. The CCITT-compressed image only seems to show content on the left side, and that content bears no resemblance to the correct content.
I have yet to find another tool to inspect the images (ArcGIS 9.2 and ENVI 4.3 fail to properly handle any multi-band 1-bit images), so I can't be entirely sure whether the problem is with reading or writing. However, I have found R and rgdal are capable of correctly writing and rereading 1-band 1-bit CCITT-compressed GeoTIFFs and multi-band 1-bit LZW/DEFLATE-compressed GeoTIFFs.
R & rgdal: Windows XP x86, R 2.12.0, rgdal 0.6-30, sp 0.9-72, GDAL 1.7.2, PROJ.4 4.7.1 gdal_translate: Red Hat 3.4.2-6.fc3, GDAL 1.7.3
Attachments (1)
Change History (2)
by , 13 years ago
Attachment: | 2bands.tif added |
---|
comment:1 by , 13 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
On closer inspection, this seems to come from libtiff. I'll close this bug and open one there.
2-band Byte uncompressed input test file