Converting PSD to PNG problem

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
cdcr1985

Converting PSD to PNG problem

Post by cdcr1985 »

Now a days I'm developing a app to make User panel in Windows Vista and Seven, but I have problem at image converting process.

I made a kind of template to edit in photoshop, but when I convert, cut, and apply windows doesn't recognize it transparency.
Example:
This is my template
http://k-rlitos.com/mic/tmp/imagemagick/UserPanel.psd

With Convert:
http://k-rlitos.com/mic/tmp/imagemagick/userpanel-0.png

and this is my problem:
http://k-rlitos.com/mic/tmp/imagemagick/problem.png

so, there are a program to made this, is not free, but this program "Auto fixes alpha-channels from Photoshop" and I can get a functionally png:
http://k-rlitos.com/mic/tmp/imagemagick ... osited.png
and works:
http://k-rlitos.com/mic/tmp/imagemagick/noproblem.png

so, any ideas?

I tried with convert UserPanel.psd -colorspace RGB -alpha on -intent perceptual userpanel.png and a lot of other commands, please help.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Converting PSD to PNG problem

Post by fmw42 »

If your psd contains a cmyk image, then

convert -colorspace RGB image otheroptions.result.png

or you need to use profiles

see
http://www.imagemagick.org/Usage/formats/#profiles
http://www.imagemagick.org/Usage/basics/#why
cdcr1985

Re: Converting PSD to PNG problem

Post by cdcr1985 »

I will try, but I have other question, there are a option called -backgroud. In manual saids "The color is specified using the format described under the -fill option. The default background color (if none is specified or found in the image) is white." and I think this affects on my image, example http://k-rlitos.com/mic/tmp/imagemagick/problem.png , I tried to use, but I have the same result with or without background command. are there a transparent color?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Converting PSD to PNG problem

Post by fmw42 »

I don't really understand the problem. The images look very much the same except for the text. Can you explain in more detail what the problem is?
cdcr1985

Re: Converting PSD to PNG problem

Post by cdcr1985 »

Windows XP does not support some PNG attributes, look, after apply a fixed PNG image shows http://k-rlitos.com/mic/tmp/imagemagick/noproblem.png, this works when I use a non free program, but when I try to use imagemagick convert command windows does not recognize PNG fine http://k-rlitos.com/mic/tmp/imagemagick/problem.png , UserPanel is not transparent unlike, it's white.

Well, I follow your links, and I read profiles, and I noticed some attributes are different:
Fixed image:
Units: PixelsPerCentimeter
Alpha: none #00000000

Image with problem:
Units: PixelsPerInch
Alpha: rgba(255,255,255,0) #FFFFFF00


Also Channel statistics (Red, Green, Blue) are different, Channel statistics (alpha) are equal.

The other attributes the others wokrs same way with -intent Perceptual
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Converting PSD to PNG problem

Post by fmw42 »

Sorry I am not a windows user, so cannot say whether this a Windows issue or an IM issue.

PNG write options are at:

http://www.imagemagick.org/Usage/formats/#png_formats
http://www.imagemagick.org/Usage/formats/#png_write

But PNG format is under development right now for improvments and bug fixes.
Post Reply