If you are on a Unix-like system, you can use subshell processing to save up layer in a miff: file. Then write the miff file to psd. For example, if I have 4 images (that I will create first), then I can do the following:
# create 4 different images from the rose: image
Code: Select all
convert rose: rose0.png
convert rose: -rotate 90 rose1.png
convert rose: -rotate 180 rose2.png
convert rose: -rotate 270 rose3.png
# now process the 4 images into a layered psd
Code: Select all
arr=(rose0.png rose1.png rose2.png rose3.png)
(
for ((i=0; i<4; i++)); do
convert xc:none[70x46+0+0] xc:none[70x46+0+0] xc:none[70x46+0+0] ${arr[$i]} -insert $i miff:- | montage - -background none -tile x1 -geometry +10+10 miff:-
done
) | convert - \( -clone 0-3 -background none -layers merge +repage \) +insert rose_montage.psd
http://www.fmwconcepts.com/misc_tests/rose_montage.psd
or square up the xc:none images as:
Code: Select all
convert rose: rose0.png
convert rose: -rotate 90 rose1.png
convert rose: -rotate 180 rose2.png
convert rose: -rotate 270 rose3.png
arr=(rose0.png rose1.png rose2.png rose3.png)
(
for ((i=0; i<4; i++)); do
convert xc:none[70x70+0+0] xc:none[70x70+0+0] xc:none[70x70+0+0] ${arr[$i]} -insert $i miff:- | montage - -gravity northwest -background none -tile x1 -geometry +10+10 miff:-
done
) | convert - \( -clone 0-3 -background none -layers merge +repage \) +insert rose_montage2.psd
The parenthesis processing creates the PSD composite (first layer)