Page 1 of 1

-flatten won't work on PSD?

Posted: 2018-02-11T23:49:23-07:00
by johnbasi
Hi guys,

I have PSD files with different backgrounds and will convert them to PSD without background or white. That part is covered but I noticed that after the convertion the resulting file is twice or thrice the size of the original PSD.

I tried using -flatten in the command but to no avail. Is there another way to flatten or combine all layers using IM?

Here is the command that I am using:

Code: Select all

convert input.psd[0] -background White -alpha background -flatten result.psd
My IM version is 7.0.1

Thank you in advance.

Re: -flatten won't work on PSD?

Posted: 2018-02-12T11:46:26-07:00
by fmw42
Post your PSD file to some free hosting service that does not change the format (or zip the file) and put the URL here. We need to see your file and what is in it to understand what is happening. Also what is your platform and exact IM version 7.0.1.x?

Re: -flatten won't work on PSD?

Posted: 2018-02-14T03:10:15-07:00
by johnbasi
Hi, thank you for your response but my colleague have found a solution on this issue.

I have another question though, is it possible to have conditional statement in a single command?
I.e. if the INPUT file has Clipping path Then
Run Clipping path command
else
Run default command

Version: ImageMagick 7.0.1-3 Q16 x64 2016-05-11