Is there a generic means of ignoring the "preview" layer in PSD files while flattening them to JPEG? When I do:
convert test.psd -flatten test.jpeg
I get a JPEG which is just the "preview" layer (as that is the last one in the file). If I do NOT use "-flatten", I get 2 JPEGs: one with the image layer (my test image has just a single layer) and another with the "preview" layer.
I realize I can do:
convert test.psd[0] test.jpeg
but I want to use this technique for PSDs I know nothing about. What I'd like is something like:
convert test.psd[0-(n-1)] -flatten test.jpg
Any ideas?
Ignoring "preview" layer while converting PSD to JPEG?
Re: Ignoring "preview" layer while converting PSD to JPEG?
Nevermind...
After reading the docs more thoroughly, I found I actually CAN do:
convert test.psd[0--2] -flatten test.jpg
Where the "-2" is the next to last layer ("-1" would be the last).
After reading the docs more thoroughly, I found I actually CAN do:
convert test.psd[0--2] -flatten test.jpg
Where the "-2" is the next to last layer ("-1" would be the last).
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Ignoring "preview" layer while converting PSD to JPEG?
That assumes psd files always contains a preview image, or the PSD
file only ever has one image in the file.
Can they have multiple images?
Is the preview optional for a multi-image form?
I would like to know for completeness in IM examples.
file only ever has one image in the file.
Can they have multiple images?
Is the preview optional for a multi-image form?
I would like to know for completeness in IM examples.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/