Tiled TIFFs

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Tiled TIFFs

Post 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.
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Re: Tiled TIFFs

Post 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.)
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Tiled TIFFs

Post 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.
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Re: Tiled TIFFs

Post by Drarakel »

Tested with IM v6.6.4-4. It all works now. Thank you!
Post Reply