rmagick-temp / rmagick

An interface to the ImageMagick and GraphicsMagick image processing libraries.
http://rmagick.rubyforge.org/
MIT License
790 stars 102 forks source link

ImageMagick library function failed to return a result on from_blob #124

Closed bjm88 closed 9 years ago

bjm88 commented 9 years ago

Hi - I am reading in this PDF that opens fine in acrobat, browser, and other software. I get an issue here.. in rails console, urlimage = open(path) => #File:/tmp/test.pdf image = Magick::ImageList.new => [] scene= f = urlimage.read out = image.from_blob(f) RuntimeError: ImageMagick library function failed to return a result. from ~/.rvm/gems/ruby-1.9.3-p550@caredox/gems/rmagick-2.13.2/lib/rmagick.rb:1624:in `from_blob'

As you can see we are on ruby 1.9.3 and latest rmagick lib 2.13.2 and I have recent ImageMagick installed....not sure how to confirm rmagick is using my latest or some other version though.. convert -version Version: ImageMagick 6.8.9-8 Q16 x86_64 2014-10-23 http://www.imagemagick.org Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC Features: DPC Modules Delegates: bzlib freetype jng jpeg ltdl lzma png xml zlib

Any help is appreciated, thank you. Git doesn't allow me to attach the PDF....I've hosted it here... http://storage.googleapis.com/testing-samples/test_imm_card.PDF

bjm88 commented 9 years ago

Issue resolved, you have to install ghost script also. It would be nice if a proper error message was shown like cannot convert PDF or something...

https://gist.github.com/leomelzer/3949356

bf4 commented 9 years ago

sorry :) thanks for sharing the fix