From: Jehan Date: Tue, 14 Feb 2023 10:21:18 +0000 (+0100) Subject: babl: LUT from 3bpp to 4bpp must add a fully opaque alpha. X-Git-Tag: archive/raspbian/1%0.1.106-3+rpi1^2~15^2^2~27 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7b9764a7d4fcc8c4caeab48c2ce5d3f78a915991;p=babl.git babl: LUT from 3bpp to 4bpp must add a fully opaque alpha. For instance, conversion from "RGB u8" to "RGBA u8". With previous code, the resulting color was right but the pixel was fully transparent. --- diff --git a/babl/babl-fish-path.c b/babl/babl-fish-path.c index 26072d5..ed89590 100644 --- a/babl/babl-fish-path.c +++ b/babl/babl-fish-path.c @@ -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; }