AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

1996.12.05 22:28 "tiffcp and tiled, planar files", by Ed Grissom
1996.12.06 06:56 "Re: tiffcp and tiled, planar files", by Bjorn P. Brox
1996.12.06 15:13 "RE: tiffcp and tiled, planar files", by Ed Grissom
1996.12.06 16:54 "Re: tiffcp and tiled, planar files", by Gary Burgess

1996.12.05 22:28 "tiffcp and tiled, planar files", by Ed Grissom

Hello all -

I have run into a problem generating tiled, planar config = 2, RGB files with tiffcp. Unless I am doing something wrong, it appears that the problem lies in tiffcp's data copying routines, not libtiff itself.

Here is an example that you should be able to try...

tiffcp -c none -p contig   -t -w 128 -l 128 input.tif tiled.tif
tiffcp -c none -p separate -t -w 128 -l 128 tiled.tif tilplan.tif

"input.tif" is a strip-based, chunky, RGB image.
"tiled.tif" looks ok as a tiled chunky RGB image.
"tilplan.tif" is where the problem occurs.

If the length and width of "input.tif" are identical to the tile size (i.e. exactly one full tile), everything is ok. In all other cases, a variety of problems appear.

input.tif size       tile size          result
---------------------------------------------------
125x125              128x128           scrambled data
128x128              128x128           good image
250x250              128x128           top half scrambled, bottom blank
256x256              128x128           top half ok, bottom blank

I have disabled STRIPCHOP_SUPPORT (per previous list discussion) to no avail.

Doing this in one step (input.tif -> tilplan.tif) gives identical results, but I wanted to be sure that tiffcp was not having trouble doing tiling and band separated data at the same time. With the two step process, the input is tiled, as is the output, so it only needs to separate the planes in the second step. (Hmmm... tiffcp may just get the entire input image into a buffer, regardless of strip/tiles, so there may be no differences in the two cases.)

Identical results are obtained with "-c lzw" or "-c packbits".

Questions:

Am I doing something wrong, or is this a known problem, or has this not come up before? (I realize tiling is not widely supported, nor is "planar" data, so I won't be surprised if no one has tried this)

This was mainly an exercise to generate some files for testing our own internal TIFF I/O implementation, so does anyone have any small, planar, RGB multiple tile files that I could test with?

Is anyone familiar enough with the data copy routines in tiffcp to help me understand/debug the problem?

Thanks for any help.....

--
ed grissom
egrissom@ingr.com