Error while detecting the transparency in Photoshop created tiff file.

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
mfsi_nishanth
Posts: 2
Joined: 2017-01-17T08:27:26-07:00
Authentication code: 1151

Error while detecting the transparency in Photoshop created tiff file.

Post by mfsi_nishanth »

Getting Error while detecting the transparency in Photoshop created tiff file.

Tested with version 6.9.7-4 on CentOS release 6.7 (Final)

identify -quiet -format %A 1053238.tif[1]
identify: Tag 42034: Rational with zero denominator (num = 0). `1053238.tif' @ error/tiff.c/TIFFErrors/564.
True

Tested with version 7.0.4-4 on CentOS release 6.7 (Final)

identify -quiet -format %A 1053238.tif
identify: Tag 42034: Rational with zero denominator (num = 0). `1053238.tif' @ error/tiff.c/TIFFErrors/569.
UndefinedBlend

identify -quiet -format %A 1053238.tif[0]
identify: Tag 42034: Rational with zero denominator (num = 0). `1053238.tif' @ error/tiff.c/TIFFErrors/569.
Undefined

identify -quiet -format %A 1053238.tif[1]
identify: Tag 42034: Rational with zero denominator (num = 0). `1053238.tif' @ error/tiff.c/TIFFErrors/569.
Blend
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Error while detecting the transparency in Photoshop created tiff file.

Post by fmw42 »

Probably best to provide an example tif image. You can upload to some place such as dropbox.com and put the URL here.
mfsi_nishanth
Posts: 2
Joined: 2017-01-17T08:27:26-07:00
Authentication code: 1151

Re: Error while detecting the transparency in Photoshop created tiff file.

Post by mfsi_nishanth »

Hi Please find below, sample image shared via dropbox

https://www.dropbox.com/s/f8e0eqf4tzfp7 ... 8.tif?dl=0
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Error while detecting the transparency in Photoshop created tiff file.

Post by fmw42 »

Your tif file is rather strange. Photoshop shows one layer only. But IM sees two layers. The first is opaque and the second is smaller but transparent. Usually the second layer is invisible. Also your tif file is CMYK and png will not support that. So you need to convert to RGB.

This command works fine for me on IM 6.9.7.4 Q16 Mac OSX:

Code: Select all

identify -quiet -format "%A\n" 1053238.tif
False
True

Using IM 7.0.4.4 Q16 Mac OSX, I get

Code: Select all

magick identify -quiet -format "%A\n" 
Undefined
Blend

I do not understand why the difference in the two systems

So this seems to be a bug.
_______________

ASSIDE: I can convert your file to PNG as follows on IM 6.9.7.4 Q16 Mac OS. Here I get the transparency from the clip path and apply it to the first and larger opaque layer.

Code: Select all

identify -quiet -format "%[8BIM:1999,2998:#1]" 1053238.tif[0]  |\
convert -quiet 1053238.tif[0] -profile /Users/fred/images/profiles/sRGB.icc \( - -negate \) \
-alpha off -compose copy_opacity -composite \
result.png
Post Reply