Imagick Error convert tiff to pdf

家住魔仙堡 提交于 2019-12-25 02:29:30

问题


When I tried converting a picture via :

convert image.tiff image.pdf 

It thorws the error:

convert: no images defined `mosaic.jpeg' @ error/convert.c/ConvertImageCommand/3187.

I tried installing and reinstalling imagick , libtiff and jpeg. But it didn't help. It used to work on the same machine (Mac Mavericks) but I had to reboot my machine and reinstall everything, and now it doesn't work. Thank you.

**(UPDATE) Issue Resolved: **

Installed GraphicMagick instead and worked!


回答1:


Are you using homebrew? If not, I would really recommend it - I use it for everything from ImageMagick to exiftool, ffmpeg, 7zip, openssl, netcat, jhead, gawk, gnuplot, GNU coreutils, GNU parallel etc.

Once you install it, all you do is

brew install libtiff
brew install fontconfig
brew install ghostscript
brew install imagemagick --with-fontconfig --with-ghostscript --with-libtiff

If you already have homebrew, and you installed ImageMagick without any of the extra options, you can do this:

brew list      # to see what you have got
brew install <whatever is missing out of libtiff, fontconfig, ghostscript>
brew reinstall imagemagick --with-fontconfig --with-ghostscript --with-libtiff

Oh, I forgot to say, your command works fine on my OSX Mavericks with homebrew.




回答2:


On a Mac, you can also cd into the directory of your image, and use:

sips -s format pdf input.tiff --out output.pdf

Source: http://www.mactricksandtips.com/2008/07/convert-images-using-terminal.html



来源:https://stackoverflow.com/questions/24880741/imagick-error-convert-tiff-to-pdf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!