2005.08.04 19:47 "[Tiff] (no subject)", by Philip Watkinson

2005.08.17 14:07 "[Tiff] Re: TIFFWriteScanline and G4 compressed block concatenation", by Philip Watkinson


You can extract a CCITT Group 4 image from a TIFF file with TIFFReadRawStrip() and create a valid CCITT Group 4 image file provided the image only uses one strip.


-----Original Message-----
From: Joris [mailto:joris.at.lebbeke@skynet.be]
Sent: Thursday, August 04, 2005 4:50 PM
To: TIFF mailing list; Philip Watkinson
Subject: Re: [Tiff] (no subject)

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
  1. obtain the strip offsets using TIFFGetField(), can I concatenate the
  1. 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.

__________ NOD32 1.1186 (20050804) Information __________

This message was checked by NOD32 antivirus system. http://www.eset.com