How to flatten a psd file.

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
hastingsr

How to flatten a psd file.

Post by hastingsr »

I have a particular photoshop, Banner.psd, that displays fine using IM display.
However, when I run the command

convert Banner.psd -flatten banner.jpg.

The flattened image is blurry. The psd file has 6 layers and it looks like the flattened jpg image is showing only the last three. I have a suspicion that
only the first layer is "visible".

My question is: how does the display command know that only the first layer
is visible? Is there some information in the image info that I can use to determine this?

Also, I'm new to this forum. Is there a public place I can post the psd and jpg files related to this?
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: How to flatten a psd file.

Post by Bonzo »

To link images you need to save them on a server and put the path between the [Img] tags.

I have some psd notes here http://www.rubblewebs.co.uk./imagemagick/psd.php that may or may not be of help.
hastingsr

Re: How to flatten a psd file.

Post by hastingsr »

That was my question, where are there servers I can post this on?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to flatten a psd file.

Post by fmw42 »

You need to use your own server. Then put the address to the file such as http://www.yourserver.com/yourimage.jpg as text in the message, highlight it, and then click the Img button above. That will enclose your address with Img tags so that your image will be displayed here in your message, linked from your own server.

There was a post here some time ago, that the first layer in the psd is the final composited image. You will have to do a search to see if you can find that. I think this was the post.

viewtopic.php?f=1&t=10997&p=35263&hilit ... yer#p35263

See the comment:
PSD images generally contain both a flattened version of the image and all its layers. Use the '[0]' form of the filename to just select the pre-flattened version of the image.
hastingsr

Re: How to flatten a psd file.

Post by hastingsr »

>There was a post here some time ago, that the first layer in the psd is the final composited >image. You will have to do a search to see if you can find that. I think this was the post.

That's the ticket, I just created a 12 layer psd file, Text.psd, with only the even layers visible.
The command
convert text.psd[0] text.jpg

yields the expected results.

Thanks a lot.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: How to flatten a psd file.

Post by Bonzo »

Thats interesting Fred when looking back on my psd page the first example:

Code: Select all

convert boots.psd -thumbnail 340x340 boots_png.png
This created 4 images: The first image looked like the result I was after, the second image must be the original background layer, the third image was my layer with the image and the forth was the text layer. So a psd file with 12 layers would create 13 images and all I need is the first one !
When I look back at my results it looks obvious :?
Post Reply