Extract layers from PSD with ImageMagick, preserving layout

前端 未结 2 1367
清歌不尽
清歌不尽 2021-01-30 06:53

I\'m using ImageMagick to extract layers from a PSD, and it gets them all out fine with:

convert image.psd image-%d.png

But the resulting PNG i

相关标签:
2条回答
  • 2021-01-30 07:41

    Type this to extract the layer number 2 from a PSD file:

    convert             \
      <filename>.psd[0] \
      <filename>.psd[2] \
      \(                    \
         -clone 0           \
         -alpha transparent \
      \)                    \
     -swap 0           \
     +delete           \
     -coalesce         \
     -compose src-over \
     -composite        \
     <extracted-filename>.png
    

    This creates first a transparent canvas with the same size of the PSD file, then combines it with the layer 2 keeping it's original layout (-coalesce)

    0 讨论(0)
  • 2021-01-30 07:49

    I use this command line to do what are describing:

    convert.exe <filename>.psd -set dispose Background -coalesce <outfilename>.png
    
    0 讨论(0)
提交回复
热议问题