Page 1 of 1

multilayer tif to flattened Tif

Posted: 2018-09-27T03:57:32-07:00
by johanwieland
A Tif with 2 or more layers (generated by Photoshop CC 2018) can easily be flattened to png, jpg, etcetc. But to convert multilayer.tif to singlelayer.tif is not succesfull, the result of

Code: Select all

magick multilayer.tif -flatten flattened.tif 
has the same layerstructure.
Tested it with different versions of IM 6.99, 7.06 and 7.08 (6.99 only on Macintosh platform, the 7.x version on Windows server
Does anyone has a solution for this?
Regards, Johan

Re: multilayer tif to flattened Tif

Posted: 2018-09-27T10:07:59-07:00
by fmw42
Can you post your input TIFF file to some free hosting service that will not change the format (for example try dropbox.com) or zip the file before posting and then put the URL here so the Imagemagick developers can test with it.

Re: multilayer tif to flattened Tif

Posted: 2018-09-27T11:21:09-07:00
by johanwieland
A sample multilayer-tif on dropbox:
https://www.dropbox.com/s/b1wcqvn2xd60c ... m.tif?dl=0

Re: multilayer tif to flattened Tif

Posted: 2018-09-27T11:58:43-07:00
by fmw42
I can confirm that the flattened tif still has two layers. Tested using Imagemagick 7.0.8.12 Q16 Mac OSX Sierra and checking with Photoshop.

Re: multilayer tif to flattened Tif

Posted: 2018-09-30T14:01:33-07:00
by fmw42
Here is a workaround that seems to produce a 1-layer tif

Code: Select all

convert rotterdam.tif PSD:- | convert - -flatten result.tif

Re: multilayer tif to flattened Tif

Posted: 2018-10-01T03:03:08-07:00
by johanwieland
That seems to work, but with a strange side effect: some metadata disappeared.
In the File Info/Origin i gave the fields CITY and Country a value. And that is gone after the convert. But Copyright Info URL kept his value.
converting from tif to psd seems to change some metadatafields.

Re: multilayer tif to flattened Tif

Posted: 2018-10-02T15:10:04-07:00
by fmw42
It was a crude workaround. A proper enhancement to handle layered tiffs is needed to do it correctly.