I'm using the following command to extract a metadata dump from images for later processing:
"convert IMAGEFILE -moments json:-"
I've found a few issues where the JSON output is invalid due to ImageMagick not escaping the property values correctly.
There is an example image and JSON output file here:
https://drive.google.com/folderview?id= ... sp=sharing
Convert doesn't properly escape JSON output
Re: Convert doesn't properly escape JSON output
It looks like just adding a basic JSON string escaping into ./coders/json.c might fix the issue, I might see if I can fix it tonight.
Re: Convert doesn't properly escape JSON output
Feel free to submit a pull request on github or post your patch here.
Re: Convert doesn't properly escape JSON output
Oh I had found the svn code, would https://github.com/ImageMagick/ImageMagick be the correct place to submit a patch?
C is not my strong suit but I figure adding a simple string escaping method in one file should be easy enough.
C is not my strong suit but I figure adding a simple string escaping method in one file should be easy enough.
Re: Convert doesn't properly escape JSON output
That is indeed our github page.
Re: Convert doesn't properly escape JSON output
Thanks for merging (a much better version of) the fix!
https://github.com/ImageMagick/ImageMagick/pull/14
https://github.com/ImageMagick/ImageMagick/pull/14