Convert multilayer PSD file has issues with layering
Convert multilayer PSD file has issues with layering
if I run
convert myfile.psd myfile.png
this will make 1 png layer file for each layer in the psd.
The problem is.
The layers that come out myfile.png.* are all over the place, In fact they seem centered on the layer from photoshop. I am pretty certian this has to do with the fact that the layers in photoshop are all over the pace. But I am wondering if there is a way to have imagemagic just use a relative canvas size and offsetting rather than the wonkey canvas size that photoshop is using to produce layer files that have the same relative position as it does in photoshop. IE offset the layers in the same size and position as they are in photoshop.
convert myfile.psd myfile.png
this will make 1 png layer file for each layer in the psd.
The problem is.
The layers that come out myfile.png.* are all over the place, In fact they seem centered on the layer from photoshop. I am pretty certian this has to do with the fact that the layers in photoshop are all over the pace. But I am wondering if there is a way to have imagemagic just use a relative canvas size and offsetting rather than the wonkey canvas size that photoshop is using to produce layer files that have the same relative position as it does in photoshop. IE offset the layers in the same size and position as they are in photoshop.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
It may also be that your png viewer does not show the offsets of your image.
If the offsets are important to you you can expand each layer to the full canvas
of the first frame image by using this spacial multi-image flatten formula.
This will generat multiple images as your previous command probably did.
See 'Coalesce, as a progressave flatten'
http://www.cit.gu.edu.au/~anthony/graph ... /#coalesce
The other sections on that page should also be useful to know too.
If the offsets are important to you you can expand each layer to the full canvas
of the first frame image by using this spacial multi-image flatten formula.
convert myfile.psd -set dispose Background -coalesce myfile_%d.png
This will generat multiple images as your previous command probably did.
See 'Coalesce, as a progressave flatten'
http://www.cit.gu.edu.au/~anthony/graph ... /#coalesce
The other sections on that page should also be useful to know too.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Hmm that seems like it will work
I get unkown oftion -set.
% convert -version
Version: ImageMagick 6.0.7 03/21/05 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2004 ImageMagick Studio LLC
What version do I have to upgrade to.
The RPM on the site says I have to be using Fedora core 5 is it ok If I am using 4.
% convert -version
Version: ImageMagick 6.0.7 03/21/05 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2004 ImageMagick Studio LLC
What version do I have to upgrade to.
The RPM on the site says I have to be using Fedora core 5 is it ok If I am using 4.
there is a -dispose
I tried
convert myfile.psd -dispose Background -coalesce Staircase_to_dungeontestdarin.%d.png
and that seems to do the same thing as
convert myfile.psd -coalesce Staircase_to_dungeontestdarin.%d.png
which I think may be because the man page says
-dispose <method>
GIF disposal method
I am using psd though not gif. Which I do want each layer as a seperate file. and according to the link the -set dispose Background does.
convert myfile.psd -dispose Background -coalesce Staircase_to_dungeontestdarin.%d.png
and that seems to do the same thing as
convert myfile.psd -coalesce Staircase_to_dungeontestdarin.%d.png
which I think may be because the man page says
-dispose <method>
GIF disposal method
I am using psd though not gif. Which I do want each layer as a seperate file. and according to the link the -set dispose Background does.
-set only available in new version
Right I compiled from source Image Magick and -set is there and your command does indeed do what I want.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
I get unkown oftion -set.
Yes IM is too old for that option.
You will have to set the global dispose setting before reading the image sequence using
Code: Select all
convert -dispose Background myfile.psd -coalesce myfile_%d.png
The -coalesce method is just a special one that has the side effect of allowing you to flatten a multi-image sequence to a transparent background.
Hmmm OKay you then upgraded. So you should have no further problems.
Look at the IM examples web page I pointed to for more info.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Hmm I was all excited
It seemed to work great on my test cases. So I started trying larger more complicated Photoshop files with more layers and more effects. Many many photoshop files just run forever. I tried leaving one running overnight and in the morning it was still running for more than 12 hours. So I think its safe to say it would not finish.
Are there any rules that I can have people follow in photoshop to make it so that image magic will be able to extract the layer files. Unfortunatly I cannot post any files to try since they are for use in something which has not been released to the public yet.
Are there any rules that I can have people follow in photoshop to make it so that image magic will be able to extract the layer files. Unfortunatly I cannot post any files to try since they are for use in something which has not been released to the public yet.