-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RuntimeError: Unknown pHash error on MAC OS X #69
Comments
@aonu Thanks for submitting an issue. Which version of ruby and the gem are you using? |
Had almost the same errors:
Fixed by:
Also i noticed that libjpeg recently changed version from 8b to 9b. Maybe this is the core of this issue. |
We're having this issue a lot with broken image files (dockerized linux). [1] pry(main)> img = Phashion::Image.new("broken_image.jpg")
=> #<Phashion::Image:0x0000000005702150 @filename="broken_image.jpg">
[2] pry(main)> img.fingerprint
convert: insufficient image data in file `broken_image.jpg' @ error/jpeg.c/ReadJPEGImage/1039.
convert: no images defined `pnm:-' @ error/convert.c/ConvertImageCommand/3210.
sh: 1: gm: not found
RuntimeError: Unknown pHash error
from /cache/artisan/bundle/gems/phashion-1.2.0/lib/phashion.rb:39:in `image_hash_for' Note that raising an error here is great, but it would be nice if it wouldn't be a generic RuntimeError. In addition, mh_fingerprint on the same image does a core dump and kills the active process: [3] pry(main)> img.mh_fingerprint
convert: insufficient image data in file `broken_image.jpg' @ error/jpeg.c/ReadJPEGImage/1039.
convert: no images defined `pnm:-' @ error/convert.c/ConvertImageCommand/3210.
sh: 1: gm: not found
terminate called after throwing an instance of 'cimg_library::CImgIOException'
what(): [instance(0,0,0,0,(nil),non-shared)] CImg<unsigned char>::load() : Failed to recognize format of file 'broken_image.jpg'.
Aborted (core dumped) EDIT: Noticed this has already been brought up in #67 Creating a broken image is simple, just create an empty file via bash: For reference, here's my versions of dependencies:
|
I am having the following error when I tried to use the library:
Anyone had a similar issue?
Thanks!
The text was updated successfully, but these errors were encountered: