Skip to content

Instantly share code, notes, and snippets.

@pepebe
Created June 19, 2012 17:25
Show Gist options
  • Star 18 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pepebe/2955410 to your computer and use it in GitHub Desktop.
Save pepebe/2955410 to your computer and use it in GitHub Desktop.
Ubuntu: Convert psd files with imagemagick
Source: http://superuser.com/questions/360434/any-way-to-save-all-psd-layers-separately
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.
@pepebe
Copy link
Author

pepebe commented Jun 19, 2012

Seems to do the trick but I get very stragen colors on some of the slices...

@mostafazh
Copy link

convert file.psd[0] file.png

also works for me and fixes the colors issue.

@comm1x
Copy link

comm1x commented Jan 28, 2016

Worked, thanks

@shinny79
Copy link

convert file.psd[0] file.png can do best, but how can I using im4java like this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment