ImageMagick Color Management
Posted: 2012-06-23T05:35:51-07:00
ImageMagick always supported color profiles, however, for images without a profile or a declaration of colorspace, ImageMagick assumed linear RGB. With support of the sRGB colorspace in practically every camera made now-a-days, ImageMagick was modified as of version 6.7.7-8 to assume sRGB unless otherwise specified by a color profile or colorspace (e.g. CMYK). In addition, for many of the image formats we assume grayscale is linear. Most image processing algorithms assume a linear colorspace, therefore we recommend you remove the gamma function before certain image processing algorithms are applied. For example,
Thanks to Anthony and Fred for their invaluable help in ensuring sRGB support within ImageMagick worked properly. And thanks to http://www.brucelindbloom.com/ for the correct formulations for converting linear RGB to sRGB and back.
- convert myimage.jpg -colorspace rgb -resize 200% -colorspace sRGB mybigimage.jpg
- convert myimage.jpg -set colorspace RGB myRGBimage.jpg
Thanks to Anthony and Fred for their invaluable help in ensuring sRGB support within ImageMagick worked properly. And thanks to http://www.brucelindbloom.com/ for the correct formulations for converting linear RGB to sRGB and back.