Page 1 of 1

Tiled TIFFs

Posted: 2010-09-16T08:40:07-07:00
by Drarakel
Another small issue with the TIFF format:
When one creates a tile-based TIFF, there's still a rows-per-strip tag written.

Code: Select all

convert logo: -define tiff:tile-geometry=128x128 logo_tile.tif
identify -verbose logo_tile.tif
...
tiff:rows-per-strip: 12

Such files have tile tags AND strip tags. I think, the strip tags should be omitted here.


Oh, and: When one tries to create a tiled TIFF with wrong values (values not divisible by 16), ImageMagick sometimes crashes.
This one still 'works': (There's no crash, but a normal error message and the bad value is set to maximum here.)

Code: Select all

convert logo: -define tiff:tile-geometry=130x128 try1.tif
Magick: try.tif: Bad value 130 for "TileWidth" tag. `_TIFFVSetField' @ error/tiff.c/TIFFErrors/494.

But this one crashes:

Code: Select all

convert logo: -define tiff:tile-geometry=128x130 try2.tif
At least with my installation of IM v6.6.4-2 Q16, on Windows XP.

Re: Tiled TIFFs

Posted: 2010-09-16T08:49:28-07:00
by Drarakel
Hmm.. Of course it's the user's fault when wrong values are specified.. But I'm still a bit puzzled about the outcome. Another example:

Code: Select all

convert logo: -define tiff:tile-geometry=128x10 try3.tif
Magick: try3.tif: Bad value 10 for "TileLength" tag. `_TIFFVSetField' @ error/tiff.c/TIFFErrors/494.

No crash, and the TileLength value is corrected. But here, to a value of 12!
convert try3.tif try.jpg
Magick: Nonstandard tile length 12, convert file. `try3.tif' @ warning/tiff.c/TIFFWarnings/704.
Image
The values should be divisable by 16 - right?
(And I would have thought that another requirement for TIFF tiles is to be square. But non-square tiles seem to work in IM.)

Re: Tiled TIFFs

Posted: 2010-09-16T12:00:43-07:00
by magick
We can reproduce the problem you reported and have a patch in ImageMagick 6.6.4-3 Beta available by sometime tomorrow. Thanks.

Re: Tiled TIFFs

Posted: 2010-09-18T20:13:34-07:00
by Drarakel
Tested with IM v6.6.4-4. It all works now. Thank you!