“convert:not authorized” errors with ImageMagick

If you get the following error when trying to compile to a JPG or PNG file, on a Linux machine,


convert: not authorized `<file_name>.eps' @ error/constitute.c/ReadImage/428.
convert: no images defined `<file_name>.png' @ error/convert.c/ConvertImageCommand/3275.
Error executing: convert -density 600 <file_name>.eps file_name>.png


It is probable due to added securing options that was introduced in version 6+ of the convert utility from ImageMagick that the m4cm.py script uses to convert from EPS to either PNG or JPG. For more information, refer to this post on StackOverflow. The simple solution is to find the policy.xml file which is usually located in /etc/ImageMagick<-version_number> directory, and change the following line of code,

  <policy domain="coder" rights="write" pattern="PS" />

to

  <policy domain="coder" rights="read|write" pattern="PS" />
Design a site like this with WordPress.com
Get started