Resize PSD first, then convert to PNG layers

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
alexandervrs
Posts: 7
Joined: 2014-07-05T09:00:56-07:00
Authentication code: 6789

Resize PSD first, then convert to PNG layers

Post by alexandervrs »

I am creating a node-webkit application. There is a module for it that allows executing imagemagick commands. So I am using the convert command to convert a PSD into PNG layers.

Problem is that a PSD with a large canvas (like 4000x4000) takes a very long time to convert and export each layer.

What I'd like to do is first resize the PSD (to its 30% for example, keeping all layers, just resizing the canvas) without exporting all the layers and as it is now smaller, then convert it to PNG layers.

Is this possible somehow?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Resize PSD first, then convert to PNG layers

Post by snibgo »

As a command, you could:

Code: Select all

convert in.psd -resize 30% out-%03d.png
This will:
1. read the psd, so you now hve one image per layer;
2. resize each image to 30%
3. save the images as out-000.png, out-001.png, out-002.png etc.
snibgo's IM pages: im.snibgo.com
Post Reply