Bug 2271 - multi-band 1-bit CCITT-compressed TIFFs write incorrectly
: multi-band 1-bit CCITT-compressed TIFFs write incorrectly
Status: RESOLVED LATER
: libtiff
default
: unspecified
: PC Windows NT
: P2 normal
: ---
Assigned To:
:
:
: migrated_to_gitlab
:
:
  Show dependency treegraph
 
Reported: 2010-11-12 15:50 by
Modified: 2019-10-01 14:19 (History)


Attachments
2-band 1-bit uncompressed tiff test (2.61 KB, image/tiff)
2010-11-12 15:50, osoong+maptools@gmail.com
Details
3 band example (3.88 KB, image/tiff)
2010-11-15 15:03, osoong+maptools@gmail.com
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2010-11-12 15:50:41
Created an attachment (id=423) [details]
2-band 1-bit uncompressed tiff test

I've arrived here after following dependencies in R & rgdal, through GDAL.  My
apologies if this seems familiar to anybody.

I've attached a test tif (2bands1bitlt.tif), which is a 2-band 1-bit
uncompressed TIFF.  I run tiffcp: 
tiffcp -c g4 2bands1bitlt.tif 2bands1bitltg4.tif
tiffcp -c none 2bands1bitltg4.tif 2bands1bitltnone.tif

The uncompressed files differ: 
tiffcmp 2bands1bitlt.tif 2bands1bitltnone.tif

I can examine the files using R & rgdal, and the compressed version
(2bands1bitltg4.tif) is the left half of the full version (i.e., the right half
is all 0).  The error is then unsurprisingly propagated into
2bands1bitltnone.tif.

This is with libtiff-3.9.4 on Red Hat 3.4.2-6.fc3.
------- Comment #1 From 2010-11-12 15:52:45 -------
I forgot to mention that 1-band 1-bit CCITT-compressed TIFFs and multi-band
1-bt LZW-compressed TIFFs seem to work properly.

I also forgot to set the importance correctly.
------- Comment #2 From 2010-11-15 15:03:38 -------
Created an attachment (id=424) [details]
3 band example

I noticed that the amount of the original image that is conserved in the
corrupted file is proportional to the number of bands.  With a 1-band file, the
CCITT-compressed output is entirely correct.  With a 2-band file, only the left
half is correct.  With a 3-band file, only the left third is correct.
------- Comment #3 From 2019-10-01 14:19:35 -------
Bugzilla is no longer used for tracking libtiff issues. Remaining open tickets,
such as this one, have been migrated to the libtiff GitLab instance at
https://gitlab.com/libtiff/libtiff/issues .

The migrated tickets have their summary prefixed with [BZ#XXXX] where XXXX is
the initial Bugzilla issue number.