Page 1 of 1

Identify reacts differently on different platforms

Posted: 2016-12-20T02:06:25-07:00
by StefaanD
Have a question because identify seems to react differently on different platforms for the same file. Below the versions of ImageMagick installed on the two platforms. Maybe it has something to do with IM being a latter version on OS X ? But the IM change log between those 2 versions didn't make me any the wiser.

The file in question is a TIFF file created with Photoshop CC2014 on OSX.

Using the

Code: Select all

identify -verbose
command on both platforms for the same TIFF file gives different results. In the case of identify on OS X there are two parts in the output, the second containing alpha channel information. And in the case of identify on Linux the second part is not in the output so there's no alpha channel information there.

identify on Linux
identify on OSX

In the case of OS X i would be able to determine if the file has transparency. But on Linux this seems not possible as the necessary information isn't there.

Code: Select all

identify -format %A
on OS X returns FalseTrue but on Linux the output is False.


The question now is how can i reliably determine if a file has transparency on Linux for above Photoshop TIFF created files ?


linux, CentOS 6.5

[root@releasetest ~]# convert -version
Version: ImageMagick 6.8.9-8 Q16 x86_64 2016-11-10 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates: bzlib djvu fontconfig freetype jng jpeg lcms openexr pangocairo png tiff x xml zlib



OSX Sierra 10.12.1

Stefaans-MacBook-Pro:~ stefaan$ convert -version
Version: ImageMagick 6.9.7-0 Q16 x86_64 2016-12-19 http://www.imagemagick.org
Copyright: Copyright 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules
Delegates (built-in): bzlib freetype jng jpeg ltdl lzma png tiff webp xml zlib

Image

Re: Identify reacts differently on different platforms

Posted: 2016-12-20T02:15:39-07:00
by snibgo
Your file has two images. Only the second has alpha.

You have two different versions of IM. v6.8.9-8 on Linux finished early, in the first image, with an error: "Rational with zero denominator (num = 0)." I don't know if this was an IM bug or a problem in your file.

Re: Identify reacts differently on different platforms

Posted: 2016-12-20T02:30:02-07:00
by StefaanD
Seems like this is a warning as per the answer on this thread

Strange thing is then that -quiet should actually suppress this, but it doesn't happen on Linux.

Re: Identify reacts differently on different platforms

Posted: 2016-12-20T02:35:31-07:00
by snibgo
identify: Tag 42034: Rational with zero denominator (num = 0). `1053238.tif' @ error/tiff.c/TIFFErrors/561. [root@releasetest 0_1000]#
Your listing shows an error, not a warning.

If it was merely a warning, it would say "warning" instead of "error", and it would continue processing.

Re: Identify reacts differently on different platforms

Posted: 2016-12-20T02:41:14-07:00
by StefaanD
OK thanks, i'll check to update IM on Linux to the same version and then check again if the error remains.

Re: Identify reacts differently on different platforms

Posted: 2016-12-20T07:00:17-07:00
by StefaanD
Updating IM to the same version running on my local Mac, now gives the same output.

Still the error is listed. Not sure if i should report this as a bug ?

Code: Select all

identify: Tag 42034: Rational with zero denominator (num = 0). `/home/V2PonDRUPA/myMedia/Assets/Demo-omgeving/TIFF/1053238.tif' @ error/tiff.c/TIFFErrors/562.
Also need to figure out why my conversion command doesn't result in a transparent image. Guess for that to work, i need to add 1053238.tif[1] for the source file when that's the second image having the transparency ?

Re: Identify reacts differently on different platforms

Posted: 2016-12-22T00:06:26-07:00
by dlemstra
Newer version of ImageMagick can read layers from a PSD tiff file. You can turn that off with: -define tiff:ignore-layers=true. Your image [0] probably has no transparency but your photoshop layer [1] probably does.