Optionally convert input images with attached ICC profiles to sRGB
A nice feature to have would be the ability to specify that I would like any input image to cjpeg that has an attached ICC profile to be converted to sRGB and have the ICC profile stripped on output. This saves the (potentially many) bytes of the ICC profile being included with the output JPEG making an image that is effectively the same in the context of the web.
Current functionality seems to be that the ICC profile is simply passed through for JPEG input images (correct but wastes space) or that the ICC profile is completely ignored for PNG input images (producing incorrect output #191).
Stripping profile might be quite bad because then the rendering of the resulting file is undefined. I've seen Firefox rendering the same image very differently when the sRGB profile was stripped out. I suggest adding a minimal sRGB profile like https://pippin.gimp.org/sRGBz/ instead.
image very differently when the sRGB profile was stripped out.
Which is wrong behavior, w3c standards say that without any tags it must see it as sRGB. chromium does that. to fix it in firefox you must use gfx.color_management.mode set to 1.
I suggest adding a minimal sRGB profile like
There is only one profile from ICC (in version 2 and 4 though and now 5), all others are fake, any change in default primaries is wrong.