[Closed] possible bug with %C and %[compression] with TIFF

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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

[Closed] possible bug with %C and %[compression] with TIFF

Post by fmw42 »

Here is a layered/paged TIFF file.

http://www.fmwconcepts.com/misc_tests/t ... iginal.tif

When using identify -verbose in IM 6.9.10.7 Q16 Mac OSX, it shows compressions of LZW, RLE, RLE

But when using string formats, it shows all the same compressions as the first layer

Code: Select all

convert original.tif -format "%[compression]\n" info:
LZW
LZW
LZW

Code: Select all

convert original.tif -format "%C\n" info:
LZW
LZW
LZW
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug with %C and %[compression] with TIFF

Post by fmw42 »

This still seems to be an issue in IM 6.9.10.9 and IM 7.0.8.9 and IM 7.0.8.10 beta.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: possible bug with %C and %[compression] with TIFF

Post by dlemstra »

This issue is caused because the compression differs per channel in a PSD file. The last known compression of a channel will be used for the compression of that layer. And this happens when the pixels of the image are being read. When we ping an image we don't read the pixels.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug with %C and %[compression] with TIFF

Post by fmw42 »

But I had not added -ping to the command. I though that meant that the pixels would be read. Is that not true?
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: possible bug with %C and %[compression] with TIFF

Post by dlemstra »

It appears that I misread your issue. This was not only an issue with layered tiff images. Just pushed a patch to resolve this issue.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug with %C and %[compression] with TIFF

Post by fmw42 »

Thanks.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug with %C and %[compression] with TIFF

Post by fmw42 »

This appears to be fixed in Imagemagick 6.9.10.10 and 7.0.8.10
Post Reply