Hi,
I am trying to convert a PSD file to a PNG file with Wand API.
I understand that by default imagemagick will convert each layer in a PSD file into separated PNG file.
With imagemagick 'convert' command line I can use '-flatten' parameter to merge all layers into a single PNG file, so I want to know how to do the same thing with the 'wand' method.
Any advice will be appreciated. My libmagickwand library is from the version 6.6.9.7.
A Wand way of converting PSD to one PNG
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: A Wand way of converting PSD to one PNG
The first layer of a PSD file is the flattened layer. So just convert the first layer to PNG.
In commmand line, one would do
Sorry, I do not know how to do that in any APIs.
In commmand line, one would do
Code: Select all
convert image.psd[0] image.png
Re: A Wand way of converting PSD to one PNG
Thanks for the reply. I did try to get the first layer with the prefix [0] but that's not the flattened one.
But the command "convert -flatten image.psd image.png" creates the flattened one that I was expecting.
This is the sample I used for testing:
http://www.freepik.com/free-psd/spring- ... 766469.htm
But the command "convert -flatten image.psd image.png" creates the flattened one that I was expecting.
This is the sample I used for testing:
http://www.freepik.com/free-psd/spring- ... 766469.htm