Page 1 of 1

Gray PSD to JPG

Posted: 2018-04-17T02:58:50-07:00
by schille
I am trying to convert the psd file (pari.psd, Download URL given below) to a jpg.
The psd file has a transparent background, but no alpha channel (in Photoshop)!
I want the background to appear white in the jpg.

Image Magick Version: ImageMagick 7.0.4-6 Q16 x64 2017-01-27 http://www.imagemagick.org
OS: Windows 10 64 bit (x64)

My conversion command is:

Code: Select all

convert pari.psd[0] -flatten out.jpg
The output jpg is black and white without any details. I tried a few options like -colorspace and -profile without success.
I opened the pari.psd file in photoshop and converted it to RGB (pariRGB.psd).
The command:

Code: Select all

convert pariRGB.psd[0] -flatten out.jpg
produces a good result.
So I think the problem is the Gray colorspace of the image, or how Photoshop stores the gray colorspace.

I experimented a bit and the following command works for this particular image.

Code: Select all

convert pari.psd  -alpha remove -flatten -fuzz 0% -fill white -opaque black out.jpg
However the shadow of the second layer is missing!

Is there a particular command to convert Gray PSDs into jpgs?
Thanks in advance!

http://2app.ws/pari.psd
http://2app.ws/pariRGB.psd

Re: Gray PSD to JPG

Posted: 2018-04-17T08:06:34-07:00
by snibgo
This works fine for me, with IM v7.0.7-28:

Code: Select all

magick pari.psd[0] -background White -layers Flatten out.png
There is detail in the light object. However, I get no shadow because IM doesn't read Photoshop layers.

If you get no detail in the object, I suggest you try a newer version of IM.

Re: Gray PSD to JPG

Posted: 2018-04-17T23:59:03-07:00
by schille
I upgraded to ImageMagick 7.0.7-28 Q16 x64 2018-03-25
and now your command works, thank you.