Page 1 of 1

convert PNG to PDF: color issues

Posted: 2012-02-08T02:39:15-07:00
by areslagae
Hi all,

I am converting a PNG to a PDF using

convert image.png -units PixelsPerInch -density 300 image.pdf

However, the colors in the PNG file are way off (gamma and color balance) when looking at both the PNG and the PDF on the screen (I have not tried printing the PDF yet).

How can I fix this?

It seems that adding the "-colorspace CMYK" option makes things much better (sRGB and RGB do not) but I do not know if that is the appropriate way to solve the problem.

There does not seem to be a color profile in the PNG image ("identify -verbose image.png | grep -i profile").

Thanks,

Thanks,

Re: convert PNG to PDF: color issues

Posted: 2012-02-08T15:00:05-07:00
by fmw42
can you post links to your png and pdf images so others can test them. Also what version of IM are you using? There has been some recent problems with -colorspace of late, mostly corrected now in the latest version.

Re: convert PNG to PDF: color issues

Posted: 2012-02-09T08:12:08-07:00
by areslagae
Hi all,

I think I have solved the issue.

The PNG file in question had a 1-bit alpha channel.

After removing that channel (convert -type TrueColor) the PNG to PDF conversion worked as expected.

Thanks,