GNU/Linux Desktop Survival Guide
by Graham Williams |
|||||
Converting Images |
20200423 ImageMagick provides considerable functionality for image conversion. Below we include some examples.
To convert from pdf to png a
-denisty
of 300 and -resize
50% seems to work
well:
$ convert -density 300 myimg.pdf -resize 50% myimg.png |
This may fail due to an ImageMagick security policy when the GhostScript interpreter is being used as in the handling of pdf files. You may like to research the risk and then override the policy by editting /etc/ImageMagick-6/policy.xml to comment out the appropriate policy line:
$ sudo emacs /etc/ImageMagick-6/policy.xml <!-- policy domain="coder" rights="none" pattern="PDF" / --> |