Resizing a PSD image

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
njs123
Posts: 1
Joined: 2013-04-15T23:47:42-07:00
Authentication code: 6789

Resizing a PSD image

Post by njs123 »

Hi,
I am trying to resize a PSD image using imagemagick,
However I am getting bad image output

please help

Regards,
NJ

My Command is as follows:
convert.exe C:\Users\nj\Desktop\Roark\X.psd[0] -colorspace sRGB -quality 100 -resize 240x240 C:\Users\nj\Desktop\Roark-Processed\X.jpg
and the PSD file:
https://docs.google.com/file/d/0B5s7cXZ ... sp=sharing

Output:
https://docs.google.com/file/d/0B5s7cXZ ... sp=sharing
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Resizing a PSD image

Post by snibgo »

Your image has alpha (transparency), which JPG can't reproduce. You can turn the alpha off:

Code: Select all

convert x.psd[0] -alpha off -colorspace sRGB -quality 100 -resize 240x240 x.jpg
snibgo's IM pages: im.snibgo.com
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Resizing a PSD image

Post by anthony »

or set a color for the alpha background
http://www.imagemagick.org/Usage/masking/#alpha_remove
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Resizing a PSD image

Post by snibgo »

In general, a background colour can be applied where there is transparency. In this particular case, much of the image is "hidden" by transparency, so one of the options that makes the pixels fully opaque is more appropriate.

@OP: see http://www.imagemagick.org/script/comma ... .php#alpha
snibgo's IM pages: im.snibgo.com
Post Reply