Commit f77e261c authored by Jehan's avatar Jehan

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
See also discussions in #5363.
parent 26903fde
Pipeline #247689 passed with stages
in 45 minutes and 43 seconds