Page 1 of 1

Error while detecting the transparency in Photoshop created tiff file.

Posted: 2017-01-17T08:54:12-07:00
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

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

Posted: 2017-01-17T09:31:36-07:00
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.

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

Posted: 2017-01-18T01:52:33-07:00
by mfsi_nishanth
Hi Please find below, sample image shared via dropbox

https://www.dropbox.com/s/f8e0eqf4tzfp7 ... 8.tif?dl=0

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

Posted: 2017-01-18T11:11:59-07:00
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