output layers of pSD file to gif

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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: output layers of pSD file to gif

Post by fmw42 »

cuongvt wrote:I found strange problem is that when I convert a psd file (multiple layers) to jpg files with command
convert aaa.psd aaa.jpg, it atomatically extract all layers to seperate files: aaa-0.jpg, aaa-1.jpg, aaa-2.jpg.
But when I extracted them to gif file: convert aaa.psd aaa.gif, it merge all layers then output only aaa.gif file.
How can I extract each layer to seperate gif file?
regards,
convert aaa.psd aaa-%d.gif
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: output layers of pSD file to gif

Post by anthony »

The difference is that JPEG can not hold more than one image per file.
GIF can, so IM stores it all in one file.

See IM Examples, File Handling, Writing a Multi-Image Sequence
http://www.imagemagick.org/Usage/files/#write_seq

There are a number of ways to handle this.
Including options for specifying the start point for the numbers.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply