Skip to content
  • Jehan's avatar
    app: Color Balance to work in HSLA/sRGB. · e1f31247
    Jehan authored
    Running Color Balance on an image with profile was very slow.
    This is because we have special conversion path for sRGB "R'G'B'" in
    babl (since babl@90da2560), but all the other color spaces are going
    through the generic path which does the double conversion to linear RGB
    then to 2.2 gamma. And that's slow.
    
    I'm not 100% sure it's right, especially as I'm seeing some CLAMPing
    going on (but I'm not sure if removing it is right either) which means
    we will likely not cover the full target space in the end.
    
    I'm letting it go because when we'll add proper version support to GEGL
    ops, we will be able to improve the algorithm without breaking XCF files
    with this filter.
    
    At least now we don't have over-slow Color Balance.
    
    As side improvements, I'm cleaning up a bit the code, which is mostly
    micro-optimizations at this point.
    e1f31247