1

I use Imagemagick convert to convert pdf file to png as follows:

Magick convert -density 300 PointOnLine.pdf -quality 90 PointOnLine.png

It gives warning:

convert: profile 'icc': 'RGB ': RGB color space not permitted on grayscale PNG `PointOnLine.png' @ warning/png.c/MagickPNGWarningHandler/1744.

And png image created is all black. However, convert to jpg image is fine. What is the problem? Thanks.

2

The documentation says this:

PNG RW Portable Network Graphics Requires libpng-1.0.11 or later, libpng-1.2.5 or later recommended. The PNG specification does not support pixels-per-inch units, only pixels-per-centimeter. To avoid reading a particular associated image profile, use -define profile:skip=name (e.g. profile:skip=ICC).

So try adding -define profile:skip=ICC (or skip="*") before the outfile name.

See also: documentation on the define command

  • No, after setting -define profile:skip=ICC, image is still dark. But if convert to jpg and then to png, it is ok, but background is dark. The same warning happens. – Math Wizard Feb 7 '18 at 18:19

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.