Page 2 of 2

Re: Multipage Tiff Extraction Functions Incorrectly

Posted: 2016-08-27T05:12:09-07:00
by locriani
dlemstra wrote:You have found a feature that was added last year. The first image has a resource block that contains layer information. Extracting one of the layers is possible as you have seen. But you cannot 'only' get the first image because the second image (layer) is part of the first image. You can disable this feature with the following define:

Code: Select all

D:\>identify -define tiff:ignore-layers=true c6f95170d8a5aebb1ee7e32bf52325b7.tif
c6f95170d8a5aebb1ee7e32bf52325b7.tif TIFF 1013x325 1013x325+0+0 8-bit CIELab 232KB 0.000u 0:00.000
I see, that's really unfortunate. Thanks for the info, it's helped me debug further causes for this issue.

It is, however, frustrating that ImageMagick doesn't have a way strip the tags specifying the layer data, as the first image block without the tag data is how Adobe intends for the image to be read outside of the context of Photoshop (at least, according to their spec).

Re: Multipage Tiff Extraction Functions Incorrectly

Posted: 2016-08-27T10:08:02-07:00
by fmw42
dlemstra wrote:-define tiff:ignore-layers=true
I tried this and wrote only layer [0] and only layer [1], but when I do identify on the saved image from layer [0], it still had two layers showing and looked like the original. The layer [1] seemed fine and identify showed only one layer.

So I am not sure that this define is meant to do.

Re: Multipage Tiff Extraction Functions Incorrectly

Posted: 2016-08-27T11:04:57-07:00
by dlemstra
The option means that it will not try to read them and add them to the 'list of images', it will still remain in the file though. You can remove the layers by removing the profile with the name 'tiff:37724'. The following will get you only the first image:

Code: Select all

convert c6f95170d8a5aebb1ee7e32bf52325b7.tif[0] +profile "tiff:37724" test.tiff

Re: Multipage Tiff Extraction Functions Incorrectly

Posted: 2016-08-27T11:31:38-07:00
by fmw42
Great. Thanks Dirk!