Skip to content
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

convert: no decode delegate for this image format `JPEG' @ error/constitute.c/ReadImage/508. #20

Closed
jacobkrahn opened this issue Apr 10, 2019 · 3 comments

Comments

@jacobkrahn
Copy link

I receive this error when trying to run the program, in addition to many following errors.

Solutions that didn't work

brew unlink jpeg and then brew link jpeg
brew install jpeg; brew link jpeg

brew uninstall imagemagick jpeg libtiff jasper; brew install imagemagick

make run
pipenv run python parser/importer.py
/Usr/.local/share/virtualenvs/receipt-parser-master-rh6oEQUF/bin/python
('Found the following images in', '/Usr/Downloads/receipt-parser-master/data/img')
['IMG0008.jpg', 'IMG0003.jpg', 'IMG0001.jpg', 'IMG0004.jpg', 'IMG0007.jpg', 'IMG0006.jpg']
('Running', "convert -rotate ' 90' '/Usr/Downloads/receipt-parser-master/data/img/IMG0008.jpg' '/Usr/Downloads/receipt-parser-master/data/tmp/IMG0008.jpg'")
convert: no decode delegate for this image format JPEG' @ error/constitute.c/ReadImage/508. convert: no images defined /Usr/Downloads/receipt-parser-master/data/tmp/IMG0008.jpg' @ error/convert.c/ConvertImageCommand/3235.
('Running', "convert -auto-level -sharpen 0x4.0 -contrast '/Usr/Downloads/receipt-parser-master/data/tmp/IMG0008.jpg' '/Usr/Downloads/receipt-parser-master/data/tmp/IMG0008.jpg'")
convert: unable to open image '/Usr/Downloads/receipt-parser-master/data/tmp/IMG0008.jpg': No such file or directory @ error/blob.c/OpenBlob/2695.
convert: no decode delegate for this image format JPG' @ error/constitute.c/ReadImage/508. convert: no images defined /Usr/Downloads/receipt-parser-master/data/tmp/IMG0008.jpg' @ error/convert.c/ConvertImageCommand/3235.
('Running', "tesseract -l deu '/Usr/Downloads/receipt-parser-master/data/tmp/IMG0008.jpg' '/Usr/Downloads/receipt-parser-master/data/txt/IMG0008.jpg.out.txt'")
sh: tesseract: command not found
('Running', "convert -rotate ' 90' '/Usr/Downloads/receipt-parser-master/data/img/IMG0003.jpg' '/Usr/Downloads/receipt-parser-master/data/tmp/IMG0003.jpg'")
convert: no decode delegate for this image format JPEG' @ error/constitute.c/ReadImage/508. convert: no images defined /Usr/Downloads/receipt-parser-master/data/tmp/IMG0003.jpg' @ error/convert.c/ConvertImageCommand/3235.
('Running', "convert -auto-level -sharpen 0x4.0 -contrast '/Usr/Downloads/receipt-parser-master/data/tmp/IMG0003.jpg' '/Usr/Downloads/receipt-parser-master/data/tmp/IMG0003.jpg'")

@jacobkrahn
Copy link
Author

I need to install some delegates apparantly

$ convert --version
Version: ImageMagick 7.0.2-0 Q16 x86_64 2016-06-17 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI
Delegates (built-in): bzlib

I have no idea how to do it though, they're here http://www.imagemagick.org/download/delegates/ but I don't know what to do with the files.

When I run

sudo yum install ImageMagick-devel
wget http://www.imagemagick.org/download/delegates/jpegsr9b.zip
tar xvfz jpegsr9b.zip
cd jpegsr9b
./configure

I get the error

-bash: ./configure: /bin/bash^M: bad interpreter: No such file or directory

@jacobkrahn
Copy link
Author

So it's fixed

brew link --overwrite imagemagick

Might have fixed it, but maybe not.

@mre
Copy link
Member

mre commented Jul 10, 2019

👍

@mre mre closed this as completed Jul 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants