AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2005.08.04 19:47 "[Tiff] (no subject)", by Philip Watkinson
2005.08.04 20:50 "Re: [Tiff] (no subject)", by Joris
2005.08.17 14:07 "[Tiff] Re: TIFFWriteScanline and G4 compressed block concatenation", by Philip Watkinson
2005.08.17 14:37 "Re: [Tiff] Re: TIFFWriteScanline and G4 compressed block concatenation", by Joris
2005.08.17 16:04 "RE: [Tiff] Re: TIFFWriteScanline and G4 compressed block concatenation", by Philip Watkinson
2005.08.17 16:49 "Re: [Tiff] Re: TIFFWriteScanline and G4 compressed block concatenation", by Joris

2005.08.04 20:50 "Re: [Tiff] (no subject)", by Joris

Philip,

Would you mind posting in plain text message format, and providing a good subject line in the future? That is the standard way to mail to a mailing list, plus, it is also efficient for both human readers and post-processing code.

  1. When generating a TIFF file and I'm using TIFFWriteScanLine(), is each call to TIFFWriteScanLine() generating a strip within the TIFF file?

That is determined by the value of the RowsPerStrip tag, http://www.awaresystems.be/imaging/tiff/tifftags/rowsperstrip.html.

In case you're familiar with strip-based access, you may be tempted to think the scanline-based access is just that, with strips spanning a single line. Well, it's not. The scanline-base access is build so as to access the multi-scanline buffers written and read using normal strip-based routines (multi meaning 1 or more).

  1. I want to extract a CCITT Group 4 image from a TIFF file. If I obtain the strip offsets using TIFFGetField(), can I concatenate the strips together to create a valid CCITT Group 4 image file?

A good way to find out is to try. I'm not enterily sure and would have to double-check, but I don't think you can do that. Two CCITT group 4 compressed blocks, concatenated, is not one valid block I think. For one thing, I'm seeing a bit accumulator that is cleared and reset in the decoder, when the same decoder state is reused on a subsequent strip, so, presumably and without additionally consulting specs, scanlines aren't aligned to byte offsets in a single group 4 compressed block.

Joris Van Damme
info@awaresystems.be
http://www.awaresystems.be/
Download your free TIFF tag viewer for windows here:
http://www.awaresystems.be/imaging/tiff/astifftagviewer.html