Replace a layer in 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
f2b
Posts: 12
Joined: 2016-04-02T14:01:02-07:00
Authentication code: 1151

Replace a layer in PSD

Post by f2b »

Hi,

Does ImageMagick allow to replace a specific layer in a PSD file?
I tried "convert myimage.jpg psdfile.psd[4]" but it replace the whole psd content with the jpg image...

i'm also interested in others solutions like adding layer in a PSD file, deleting...

Thanks for your help.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Replace a layer in PSD

Post by snibgo »

To do this with ImageMagick, you need to read the entire PSD file. Then replace whichever image in the list you want. Then write the entire PSD file.
snibgo's IM pages: im.snibgo.com
f2b
Posts: 12
Joined: 2016-04-02T14:01:02-07:00
Authentication code: 1151

Re: Replace a layer in PSD

Post by f2b »

ok, doing so i encounter a second problem:

in the original PSD file there is "adjustement layer" Curve, Color balance, level, and ImageMagic seems to not preserve them :/

My logic was to keep all the artistic setup in one PSD file for easy adjustment, and use this psd with IM to aplly those effect on multiple images
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Replace a layer in PSD

Post by snibgo »

Photoshop writes lots of metadata to PSD files. ImageMagick doesn't read or process all this metadata. If you want to use this metadata, you should do your processing with Photoshop scripts, or write the metadata in a format that IM can use.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Replace a layer in PSD

Post by fmw42 »

I do not believe that IM can handle adjustment layers, only normal image layers, at this time.
Post Reply