8

Does one of you know, what is the best and most comfortable way to parse *.psd file from command-line, get all layers and save them all as, say, *.pngs? Preferably in MacOs, Linux or FreeBSD, but Windows is also OK.

studiohack
  • 13,468
  • 19
  • 88
  • 118
shabunc
  • 810
  • 1
  • 8
  • 15

1 Answers1

10

Imagemagick will by default convert a psd to multiple images:

convert file.psd file.png

will result in file-0.png, file-1.png etc for each layer. If you wanted a single image, use the flatten switch:

convert file.psd -flatten file.png

Imagemagick is available on osx, windows and linux. And iOS somehow.

Paul
  • 59,223
  • 18
  • 147
  • 168
  • 1
    while this is true and convert indeed saves psd slides to images - just as it has been asked in the question (so I've upvoted) - in practice the actual output can be broken. For instance, you easily can get something like this - http://img-fotki.yandex.ru/get/9516/13172528.3/0_b371e_9abbaca4_orig – shabunc Oct 11 '13 at 13:03
  • my png's are broken too, looks like imagemagick has problems to convert them from the psd with this simple line – XandruCea Sep 16 '14 at 10:07