Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.

Hi all,
I'm trying to convert a PNG-File to PDF. The resulting PDF has red artefacts and a completely scrambled page layout.

The conversion seems to have a problem with the color profile in the original image. I got it to produce what appears to be a correct result by removing the color profile with "-strip". You might try something like this. It worked for me with IM 7.0.7-8 and GS 9.21 on Windows 10 Pro...

Many thanks, that worked for me. Is this a problem related to Ghostscript or to ImageMagick?
How did you figure this out?

I tried converting your original PNG to a PDF and had the same problem you had. It also created the same issue when I tried converting it to a TIFF. So I tried just converting it to another PNG and got a warning about the color profile...

Then I tested it by stripping the profile, and that eliminated the warning and produced what appears to be a proper output. I don't know if the software that created the original PNG included a non-compliant profile, or if maybe ImageMagick is handling the profile incorrectly. Someone who knows more about the internals of IM would have to weigh in on that.

In versions 6.9.5-3 and 7.0.3-5, converting to PDF works fine, and the result viewed with Adobe Reader looks good. IM doesn't use Ghostscript to write PDF.

When either version converts to PNG, I get that warning. I think it's simply a warning, that someone (GlennRP?) thinks grayscale PNG files shouldn't have colour profiles. But it does put the profile in the file. (Glenn knows far more about PNG than I do.)

I don't know what the PDF problem is, but I suspect an IM bug introduced after my versions.

I
When either version converts to PNG, I get that warning. I think it's simply a warning, that someone (GlennRP?) thinks grayscale PNG files shouldn't have colour profiles. But it does put the profile in the file. (Glenn knows far more about PNG than I do.)

The PNG speciification for the iCCP chunk declares that a grayscale color profile is invalid in an RGB image. I happen to think that that requirement is a little overreaching, but there you have it.