2008.10.31 17:10 "[Tiff] Data ordering for planar config separate", by Richard Nolde

2008.11.11 16:54 "RE: [Tiff] Writing scanlines with PLANARCONFIG == SEPARATE", by Ed Grissom

Richard -

I kinda got lost in following what you want to do, but it seems to me that if you want PLANAR, and you want the bands together by scanline, then you must set ROWS_PER_STRIP to 1. Otherwise, a number of scanlines from each band are going to be together.

>From the TIFF spec:
"If a row interleave effect is desired, a writer might write out the
data as
 PlanarConfiguration=2-separate sample planes-but break up the planes
into
 multiple strips (one row per strip, perhaps) and interleave the
strips."

Perhaps I am misunderstanding, but from what I can tell, what you are proposing is neither PLANAR nor CHUNKY as defined by the TIFF spec.

--
ed grissom
ed.grissom@intergraph.com

-----Original Message-----

From: tiff-bounces@lists.maptools.org [mailto:tiff-bounces@lists.maptools.org] On Behalf Of Richard Nolde

I've managed to get tiffcrop to support reading and writing TIFF files with bit depths from 1 to 32 for RGB files but there appears to be a limitation in the library that only it can only support PLANNARCONFIG == SEPARATE if the strips are organized with all the scanlines for a given sample packed into one or more strips before any scanlines for the next sample are written, eg:

[...deleted...]

Since the data are compressed/stored on a per scanline basis, I wanted to write the data for each sample of a given row of the image to successive scan lines within one strip to speed up access when only a part of the image is being used.

Strip 1
Scanline 1 RRRRRRRRR
Scanline 2 GGGGGGGG
Scanline 3 BBBBBBBBB

[...deleted...]

Question 1: Is it valid to write scanlines (each scanline containing only values of one sample plane) interleaved by sample within a single strip of a TIFF image for PLANNARCONFIG SEPARATE? Question 2 Is there anyway to do this within the current configuration of libtiff?

Question 3 Can libtiff be modified to handle this option without breaking existing applications?

tiffcrop author