Is it possible to replace a PSD layer with another image(IM)

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
krishan23
Posts: 4
Joined: 2012-06-20T19:32:24-07:00
Authentication code: 13

Is it possible to replace a PSD layer with another image(IM)

Post by krishan23 »

Hi all, I have two layers combined PSD file(top layer is just box second layer is background). Actually, I will have another image say that's in my server. What I want to do is, I want to replace that image file with top layer in PSD and output the image to PNG format. So I am expecting, the final image will include the image that in the server at top of the background image. Is this possible??

Replacing PSD layer with another image in ImageMagick... I am afraid that whether this is possible or not.. :(
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Is it possible to replace a PSD layer with another image

Post by fmw42 »

PNG does not support multi-layers.

You can address any layer in PSD just as you would in gif with its frame number.

So if you want to take one layer from the psd and combine it with another image.

convert image.psd[0] secondimage.png newimage.psd

see Selecting Frames at
http://www.imagemagick.org/script/comma ... 1k0rbudrr0



Note that often in PSD files, the first layer is the flattened image from all the other layers.
Post Reply