AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
November 2008

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2008.11.10 18:40 "Writing scanlines with PLANARCONFIG == SEPARATE", by Richard Nolde
2008.11.11 16:54 "Re: Writing scanlines with PLANARCONFIG == SEPARATE", by Ed Grissom
2008.11.11 17:17 "Re: Writing scanlines with PLANARCONFIG == SEPARATE", by Richard Nolde
2008.11.11 17:28 "Error in initial post for PLANARCONFIG == SEPARATE", by Richard Nolde

2008.11.11 16:54 "Re: 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
Sent: Monday, November 10, 2008 12:41 PM
To: tiff@lists.maptools.org
Subject: [Tiff] Writing scanlines with PLANARCONFIG == SEPARATE

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?

Richard Nolde
tiffcrop author