1994.01.21 18:28 "tiffcp doesn't work for "CCITT Group 3 facsimile encoding" !?", by lichtin@olsen.ch

Hi,

I'm using the TIFF v3.3beta002 library. I want to split a multipage TIFF file (with tiffsplit) and, after some processing, combine the pages again into a single TIFF file with tiffcp.

tiffsplit work ok. For example, a 2-page TIFF gets split and tiffinfo (for both files) says:

TIFF Directory at offset 0x23fc
    Subfile Type: multi-page document (2 = 0x2)
    Image Width: 1728 Image Length: 1136
    Resolution: 204, 98 pixels/inch
    Bits/Sample: 1
    Compression Scheme: CCITT Group 3 facsimile encoding
    Photometric Interpretation: min-is-white
    FillOrder: lsb-to-msb
    Orientation: row 0 top, col 0 lhs
    Samples/Pixel: 1
    Rows/Strip: (infinite)
    Planar Configuration: single image plane
    Group 3 Options: (0 = 0x0)
    1 Strips:
        0: [ 8, 9203]

When I look at the splitted files with xtiff, everything's still ok.

Now, when I try to concatenate them again, the resulting TIFF file is *not* properly containing the originals anymore! I do this:

        tiffcp file1 file2 result

And tiffinfo for "result" says:

TIFF Directory at offset 0x23fa
    Subfile Type: multi-page document (2 = 0x2)
    Image Width: 1728 Image Length: 1136
    Resolution: 204, 98 pixels/inch
    Bits/Sample: 1
    Compression Scheme: CCITT Group 3 facsimile encoding
    Photometric Interpretation: min-is-white
    FillOrder: lsb-to-msb
    Orientation: row 0 top, col 0 lhs
    Samples/Pixel: 1
    Rows/Strip: (infinite)
    Planar Configuration: single image plane
    Group 3 Options: (0 = 0x0)
    1 Strips:
        0: [ 8, 9201]

Fax3Decode1D: result: Bad code word at scanline 90 (x 1459).

TIFF Directory at offset 0x48ce
    Subfile Type: multi-page document (2 = 0x2)
    Image Width: 1728 Image Length: 1136
    Resolution: 204, 98 pixels/inch
    Bits/Sample: 1
    Compression Scheme: CCITT Group 3 facsimile encoding
    Photometric Interpretation: min-is-white
    FillOrder: lsb-to-msb
    Orientation: row 0 top, col 0 lhs
    Samples/Pixel: 1
    Rows/Strip: (infinite)
    Planar Configuration: single image plane
    Group 3 Options: (0 = 0x0)
    1 Strips:
        0: [ 9436, 9201]

Fax3Decode1D: result: Bad code word at scanline 90 (x 1459).

xtiff just shows garbage and complains with the same error message as seen right above.

However, I noticed that when I'm using a different compression scheme, e.g.

        tiffcp -lzw file1 file2 better-result

the concatenation works!

Any clues why tiffcp doesn't work? Also, could someone try it with the v3.2 version, if possible? Thanks.

Martin Lichtin                            Olsen & Associates AG (info@olsen.ch)
lichtin@olsen.ch                       Research Institute for Applied Economics
T +411-386-4848  F +411-422-2282   Seefeldstr. 233, CH-8008 Zurich, Switzerland