-flatten won't work on PSD?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
johnbasi
Posts: 14
Joined: 2017-12-08T02:45:45-07:00
Authentication code: 1152

-flatten won't work on PSD?

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: -flatten won't work on PSD?

Post 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?
johnbasi
Posts: 14
Joined: 2017-12-08T02:45:45-07:00
Authentication code: 1152

Re: -flatten won't work on PSD?

Post 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
Post Reply