babl: LUT from 3bpp to 4bpp must add a fully opaque alpha.
authorJehan <jehan@girinstud.io>
Tue, 14 Feb 2023 10:21:18 +0000 (11:21 +0100)
committerJehan <jehan@girinstud.io>
Tue, 14 Feb 2023 10:21:18 +0000 (11:21 +0100)
For instance, conversion from "RGB u8" to "RGBA u8". With previous code,
the resulting color was right but the pixel was fully transparent.

babl/babl-fish-path.c

index 26072d5f3c7380fccb4007d4b99dc8a23a6aac74..ed89590de0227d464ed7c2b49385a0d791b71321 100644 (file)
@@ -250,6 +250,7 @@ static inline int _do_lut (uint32_t *lut,
           {
              uint32_t col = src[0]*256*256+src[1]*256+src[2];
              *dst = lut[col];
+             *dst |= 0xff000000;
              dst++;
              src+=3;
           }