2000.10.17 03:51 "Mixing Tiles and Strips", by Frank Warmerdam

2000.10.17 03:51 "Mixing Tiles and Strips", by Frank Warmerdam

Folks,

The following bug has been submitted in BugZilla:

http://bugzilla.remotesensing.org/show_bug.cgi?id=19

>I'm getting error about inability to use TIFFWriteScanline() when using
>both striped and tiled images in one TIFF. Problem is that TIFFSetField
>(TIFFTAG_TILE*) sets TIFF_ISTILED in tif_flags, but TIFFWriteDirectory
>does not clear this bit. I did not found in spec that it is impossible
>to mix striped and tiled images in one file.
>
>I think that TIFFDefaultDirectory should clear also TIFF_ISTILED, except
>TIFF_DIRTYDIRECT. (why TIFFDefaultDirectory does not clear fields
>which are cleared by TIFFWriteDirectory anyway (TIFF_BEENWRITING &
>TIFF_BUFFERSETUP)).
>
>TIFFReadDirectory correctly clears this bit.

I am inclined to change TIFFDefaultDirectory() to clear the TIFF_ISTILED flag since TIFFReadDirectory() clears it; however, this is an area that scares me. It would be easy to introduce a bug that wouldn't affect me in simple tests.

Also, can anyone answer the question about differing behaviour with regard to clearing flags between TIFFReadDirectory(), TIFFWriteDirectory() and TIFFDefaultDirectory()? Is it really bad karma to mix striped images and tiled images in one TIFF file?

Best regards,

---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerda@home.com
light and sound - activate the windows | http://members.home.com/warmerda
and watch the world go round - Rush    | Geospatial Programmer for Rent