plug-ins: export with explicit PNG's sRGB chunk when no profile written.
When a profile is set, we should not set the sRGB chunk, because it would be a contradiction. But when we don't set the profile, then our code explicitly saves as sRGB. So let's add the sRGB chunk. Also when we do so, let's also set the relevant gAMA and cHRM chunks corresponding to sRGB as recommended by the PNG spec: > An application that writes the sRGB chunk should also write a gAMA > chunk (and perhaps a cHRM chunk) for compatibility with applications > that do not use the sRGB chunk. In this situation, only the following > values may be used: […] This is why I use png_set_sRGB_gAMA_and_cHRM() and not just png_set_sRGB(). See also discussions in #5363.
Showing with 27 additions and 0 deletions