Pages

Showing posts with label jpeg to eps conversion. Show all posts
Showing posts with label jpeg to eps conversion. Show all posts

Error in image file conversion: convert-im6.q16: not authorized `test.eps' @ error/constitute.c/WriteImage/1037.

This error is because of the vulnerability. This allows remote execution of code using image formats. So, some Linux distributions by default, the ImageMagic conversion is turned-off for some image file extensions. For example, I frequently convert .jpeg/.jpg to .eps. But, every time, I got an error. Here is the way how to solve it [Remember to change back the settings after converting the file in order to avoid vulnerability].

You have to change the policy.xml file in the installed ImageMagic package. 

To do that, USE:

sudo vim /etc/ImageMagick-6/policy.xml

and change the following line

<policy domain="coder" rights="none" pattern="EPS" />

to 

<policy domain="coder" rights="read | write" pattern="EPS" />

and save. Note that you should change "none" to "read | write" and then save.

Once you did this modification, you can convert using "convert" command.

Now, TRY:

convert figure.jpg figure.eps

After conversion, you may change back the line as it was before (to avoid vulnerability) which is very important.

For more information on the security issues, you can visit these links.

https://www.enisa.europa.eu/publications/info-notes/what2019s-behind-imagemagick-vulnerability

https://security.stackexchange.com/questions/122328/how-to-prevent-the-latest-imagemagick-vulnerability

You may be interested in these posts

Error in image file conversion: convert-im6.q16: not authorized `test.eps' @ error/constitute.c/WriteImage/1037.

This error is because of the vulnerability. This allows remote execution of code using image formats. So, some Linux distributions by defaul...