Does not recognize TIFF layers

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
tlichev
Posts: 16
Joined: 2012-06-27T04:05:56-07:00
Authentication code: 13

Does not recognize TIFF layers

Post by tlichev »

I have problems when converting layered TIFF file:
The sample can be found here:
https://dl.dropboxusercontent.com/u/341 ... F-test.tif
The image is contains 3 layers with transparent background, made with Photoshop (CS5 as far as can be read from the metadata)

Identify shows info for single layer

Some conversions: I would like to properly flatten the image (on white or black background), or convert it to png/gif with transparency
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Does not recognize TIFF layers

Post by snibgo »

Does ...

Code: Select all

convert MultiLayer-TIF-test.tif -background Red -alpha remove m.png
... (with whatever colour you want) do what you want?
snibgo's IM pages: im.snibgo.com
tlichev
Posts: 16
Joined: 2012-06-27T04:05:56-07:00
Authentication code: 13

Re: Does not recognize TIFF layers

Post by tlichev »

The problem as you can see is that it gets only the first layer
I need to merge the layers
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Does not recognize TIFF layers

Post by snibgo »

If your file has multiple layers, IM (and Gimp) can see only one. The image has a "profile-tiff", whatever that is, of 1,169,884 bytes. Perhaps that contains other layers.
snibgo's IM pages: im.snibgo.com
tlichev
Posts: 16
Joined: 2012-06-27T04:05:56-07:00
Authentication code: 13

Re: Does not recognize TIFF layers

Post by tlichev »

Here is a screenshot from Photoshop:
https://dl.dropboxusercontent.com/u/341 ... shot-1.jpg
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Does not recognize TIFF layers

Post by fmw42 »

I downloaded your file and opened it with PS and see 3 layers. However, they are all CMYK. That may be (?) why IM only sees one layer (a bug?).
However, when converting the image in PS to RGB and saving it, IM still sees only one layer. So I am not sure why this is happening.
Last edited by fmw42 on 2013-10-07T10:54:22-07:00, edited 1 time in total.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Does not recognize TIFF layers

Post by snibgo »

CMYK doesn't, alone, prevent IM from seeing layers. For example:

Code: Select all

D:\web\im>%IM%convert -size 100x100 xc:purple xc:pink xc:brown -colorspace CMYK
m.tif

D:\web\im>%IM%identify m.tif
m.tif[0] TIFF 100x100 100x100+0+0 16-bit CMYK 241KB 0.000u 0:00.001
m.tif[1] TIFF 100x100 100x100+0+0 16-bit CMYK 241KB 0.016u 0:00.012
m.tif[2] TIFF 100x100 100x100+0+0 16-bit CMYK 241KB 0.016u 0:00.022
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Does not recognize TIFF layers

Post by fmw42 »

identify MultiLayer-TIF-test.tif
MultiLayer-TIF-test.tif TIFF 1500x1125 1500x1125+0+0 8-bit CMYK 3.72MB 0.020u 0:00.019
identify: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/837.

Usually this is just a warning, but it may be that this tag is malformed and has important information in it about the layers.

Also EXIFTOOL thinks it has an alpha channel and shows no information about layers


1006 AlphaChannelsNames : Alpha 1

1024 LayerStateInfo :
1026 LayersGroupInfo :


I do not know enough about this to say if it is relevant or not.
tlichev
Posts: 16
Joined: 2012-06-27T04:05:56-07:00
Authentication code: 13

Re: Does not recognize TIFF layers

Post by tlichev »

What info do you need?
Also I wonder why the cases from 2. TIFF to JPG differ:
Post Reply