Skip to content

Instantly share code, notes, and snippets.

@clemens
Created January 12, 2017 15:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clemens/86b620e3f2dfbf1871ce1542df6bddbc to your computer and use it in GitHub Desktop.
Save clemens/86b620e3f2dfbf1871ce1542df6bddbc to your computer and use it in GitHub Desktop.
tmp[master]% convert logo.jpg -format png -colorspace srgb -profile ../vendor/profiles/sRGBColorSpaceProfile.icm logo.png
tmp[master]% rm logo.png
tmp[master]% cp logo.jpg logo.png
tmp[master]% mogrify -format png -colorspace srgb -profile ../vendor/profiles/sRGBColorSpaceProfile.icm logo.png
mogrify: improper image header `../vendor/profiles/sRGBColorSpaceProfile.icm' @ error/png.c/ReadPNGImage/3981.
@clemens
Copy link
Author

clemens commented Jan 14, 2017

In other words: Using convert with the exact same parameters works fine where as modifying the image in place using mogrify produces a warning. The resulting image seems to be fine though (can be opened just fine; pngcheck returns OK). The only problem is that mogrify doesn't exit with status code 0, which obviously leads to issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment