From a11209e6ed39fcdaf5cbc1750aadc6a57f47a772 Mon Sep 17 00:00:00 2001 From: dosisod <39638017+dosisod@users.noreply.github.com> Date: Sun, 12 Sep 2021 11:18:06 -0700 Subject: [PATCH] Fix white background bleeding through sixel images: Tested with and without alpha patch applied. Simply setting alpha to 255 seems to fix it. I didn't set `dst` on lines 263 and 273 because those loops are impossible to reach. --- sixel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sixel.c b/sixel.c index 7bfe598..2c382f4 100644 --- a/sixel.c +++ b/sixel.c @@ -252,7 +252,7 @@ sixel_parser_finalize(sixel_state_t *st, unsigned char *pixels) *dst++ = color >> 16 & 0xff; /* b */ *dst++ = color >> 8 & 0xff; /* g */ *dst++ = color >> 0 & 0xff; /* r */ - dst++; /* a */ + *dst++ = 255; /* a */ } /* fill right padding with bgcolor */ for (; x < st->image.width; ++x) {