linux convert : 图片格式转换轻松搞定
注意这种方法是linux 环境下完成的哦
安装imagemagick:
apt-get -y install imagemagick
convert -version 查看版本
安装后可能因为权限问题无法使用,比如出现以下ERROR:
ImageMagick not authorized to convert PDF to an image
解决方法:
安装 imagemagick后找到policy.xml 文件,在policy.xml 文件中找到下面这一行,
<policy domain="module" rights="none" pattern="{PS,PDF,XPS}" />
把这一行改为下面的样子:即加上了读写权限
<policy domain="module" rights="read|write" pattern="{PS,PDF,XPS}" />
这样就解决了权限报错问题。
使用方法
超级简单哦,以下是举例~~