Skip to content
  • Jehan's avatar
    Issue #3265: PNG gAMA chunk is silently ignored. · d21911eb
    Jehan authored
    PNG has support for profiles, which is the state-of-the-art way to
    handle color management nowadays. But it also had some very basic color
    management based on a gAMA chunk (for the gamma) and a cHRM chunk
    (primary chromaticities).
    We don't have a core concept with just these and don't want to walk
    backward anyway, but we can easily make basic RGB profiles from these.
    This is what this commit is about. It generates profiles at import which
    were not actually inside the image, but only represented by these 2 PNG
    chunks. What gives it away is that GIMP will propose to convert/keep the
    profile at start (unless configured otherwise, as any profile), and the
    profile name will specify it is a profile generated from PNG chunks'
    values.  One can even discard the profile later (if you didn't convert),
    so it gives a solution if somehow these metadata were not proper.
    d21911eb