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

1996.12.06 15:13 "RE: tiffcp and tiled, planar files", by Ed Grissom

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.

Are you sure that the images is wrong?

How are you checking the images?

It migth be your viewer that does not handle tiled images correct.

The errors you describe is a typically error that happens when the viewer does not clip

Actually, one of my viewers can handle tiffcp-created, tiled, chunky images fine, and as a matter of fact also handles three other tiled formats fine (one format actually clips unfilled tiles on disk, and the other two formats pad unfilled tiles like TIFF does) - so I just used tiffcp again to convert from planar (separate) back to chunky (contig) to view them.

My other viewer does not handle tiled files so I used tiffcp to untile the images.

Identical looking result in both cases. This leads me to suspect it is tiffcp that is not clipping or copying correctly.

I also have created these same format images with my own library, and then used a "hex" editor to explore the differences between my files and tiffcp's files. The result of that exploration makes me think the problem occurs when tiffcp creates the planar tiled file, not in the later step of reading the planar tiled file and generating either an untiled file or a chunky file.

I'd be glad to uuencode the images and mail them (~200K) directly to anyone interested in looking at them, but you should be able to create them easily enough with tiffcp. Here would be the steps involved:

use tiffcp to convert from strip, chunky -> tiled, chunky
use tiffcp to convert from tiled, chunky -> tiled, planar
use tiffcp to convert from tiled, planar -> tiled, chunky
use tiffcp to convert from tiled, chunky -> strip, chunky

or even easier,

use tiffcp to convert from strip, chunky -> tiled, planar
use tiffcp to convert from tiled, planar -> strip, chunky

The resulting image should be viewable by most tiff readers, and should exhibit the problems I described. If so, It is obvious to me that tiffcp has messed up somewhere in the process. (Remember, if the image size and the tile size are identical, everything works fine, so make them different to see the problem)

Try to use tiff2ps -2 to print the images and check the results.

I'll do this later today and report back.

--
ed grissom
egrissom@ingr.com