Problem: ImageMagick convert is unable to crop image. It looks like it doesn't recognize the image type?
What I've Tried:
I've searched around online and I've seen several similar issues but not mine. I've attempted their solutions including
- Uninstalling and reinstalling ImageMagick via brew.
- identify -list format (JPEG, GIF, PNG, TIFF, etc were all there and all had rw permissions)
- convert -version (png is is among the built-in delegates)
- convert pic1.png pic1-jpg.jpg (this worked fine)
- convert pic1-jpg.jpg pic1-jpg.jpg (this worked fine)
- convert pic1-jpg.jpg 805X972+34+94 pic1-jpg-crop.jpg (this gave the same error as for png as shown below)
I'm working on Mac OSX El Capitan and everything else in terminal works fine. ImageMagick was already installed.
When I run:
$ convert /Users/Innovate/Desktop/crop/2015-04-26-GinaDate13_487.png 805X972+34+94 /Users/Innovate/Desktop/crop/2015-04-26-GinaDate13_487-cropped.png
I get:
convert: unable to open image `805X972+34+94': No such file or directory @ error/blob.c/OpenBlob/2702.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/504.
no decode delegate for this image format `' @ error/constitute.c/ReadImage/504
In the other posts on this issue, people get
convert no decode delegate for this image format `PNG'
Or similar (except with their image type or filename and image type)
However, mine doesn't say anything about image file type...
I have not tried uninstalling ImageMagick then installing it manually from sources because I'm not very confident at doing that... (this solution was shown: https://stackoverflow.com/a/34633084/5398660 )
Does anyone know what might be going on?
Also, can anyone help me interpret the @ error/constitute.c/ReadImage/504 part? I'm looking at the code for constitute.c but I'm not sure if I can get useful information from it to solve my problem (I only know a bit of C)
Thank you!
805X972+34+94
. The convert utility is treating the geometry argument as a file path. – emcconvilleconvert /Users/Innovate/Desktop/crop/2015-04-26-GinaDate13_487.png -crop 805X972+34+94 /Users/Innovate/Desktop/crop/2015-04-26-GinaDate13_487-cropped.png
– emcconvilleconvert /Users/Innovate/Desktop/crop/2015-04-26-GinaDate13_487.png[805X972+34+94] /Users/Innovate/Desktop/crop/2015-04-26-GinaDate13_487-cropped.png
or by putting -crop before the crop coordinates. – fmw42