Skip to content
  • Jehan's avatar
    libgimp, pdb: replacing gimp_brush_get_pixels() by gimp_brush_get_buffer()… · 1ff9c12b
    Jehan authored
    … and gimp_brush_get_mask().
    
    gimp_brush_get_pixels() was a bit crappy, returning raw data with only
    dimensions and bpp to go with (no color model/space, no bit depth…). So the
    assumption is that we work with 8-bit per channel data, possibly with alpha
    depending of number of channels as deduced from bpp, and very likely in sRGB
    color space. It might be globally ok with many of the brush formats (and
    historical brushes) but won't fare well as we improve brush capabilities.
    
    - gimp_brush_get_pixels() is in fact made private.
    - The 2 new functions are using this old PDB call _gimp_brush_get_pixels() to
      construct buffers. This has some limitations, in particular that it returns
      only 8-bit per channel sRGB data, but at least the signature won't change when
      we will improve things in the future (so if some day, we pass fancy brushes in
      high-bit depth, the method will stay the same).
    - This new implementation also allows sca...
    1ff9c12b