Identify reacts differently on different platforms

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
StefaanD
Posts: 4
Joined: 2016-12-20T01:59:24-07:00
Authentication code: 1151

Identify reacts differently on different platforms

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Identify reacts differently on different platforms

Post 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.
snibgo's IM pages: im.snibgo.com
StefaanD
Posts: 4
Joined: 2016-12-20T01:59:24-07:00
Authentication code: 1151

Re: Identify reacts differently on different platforms

Post 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.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Identify reacts differently on different platforms

Post 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.
snibgo's IM pages: im.snibgo.com
StefaanD
Posts: 4
Joined: 2016-12-20T01:59:24-07:00
Authentication code: 1151

Re: Identify reacts differently on different platforms

Post by StefaanD »

OK thanks, i'll check to update IM on Linux to the same version and then check again if the error remains.
StefaanD
Posts: 4
Joined: 2016-12-20T01:59:24-07:00
Authentication code: 1151

Re: Identify reacts differently on different platforms

Post 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 ?
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Identify reacts differently on different platforms

Post 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.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Post Reply