2008.11.11 16:54 "RE: [Tiff] Writing scanlines with PLANARCONFIG == SEPARATE", by Ed Grissom
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
PlanarConfiguration=2-separate sample planes-but break up the planes
multiple strips (one row per strip, perhaps) and interleave the
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.
From: email@example.com [mailto:firstname.lastname@example.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:
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.
Scanline 1 RRRRRRRRR
Scanline 2 GGGGGGGG
Scanline 3 BBBBBBBBB
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?