Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libpng18] [bug fix] Adjust colorspace calculations for ACES AP0 #609

Merged
merged 1 commit into from
Oct 6, 2024

Commits on Oct 1, 2024

  1. fix: Adjust colorspace calculations for ACES AP0

    The subtracts in PNG_XYZ_from_xy are producing integer overflow with
    some valid but extreme xy values.  This re-introduces the previous
    checks, but with less limited bounds; sufficient to accomodate the
    ACEScg end points (ACES AP1), but not for the ACES AP0 end points.
    Those were not working anyway because libpng reads the cHRM parameters
    as unsigned values, so they must always be at least 0.
    
    A better solution requires recognizing reasonable negative values (ones
    which violate the current spec) and allowing them too, at least on read.
    
    Reviewed-by: Cosmin Truta <[email protected]>
    Signed-off-by: John Bowler <[email protected]>
    Signed-off-by: Cosmin Truta <[email protected]>
    jbowler committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    ec53479 View commit details
    Browse the repository at this point in the history