Error in converting a PDF to a PNG in ImageMagick
Solution 1:
Try adding -colorspace RGB before the outfile name.
convert -density 300 PointOnLine.pdf -quality 90 -colorspace RGB PointOnLine.png
Solution 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