app: zero-out transparent pixels when converting to indexed

When converting an image to indexed mode, zero-out transparent
pixels instead of leaving junk in their indices, which might well
be out of range of the palette.

(cherry picked from commit 09870d4b15)
This commit is contained in:
Ell
2020-05-20 21:14:56 +03:00
parent 3e61ef9ae6
commit 5771393379

View File

@ -714,6 +714,8 @@ remap_indexed_layer (GimpLayer *layer,
{
if (data[ALPHA_I])
data[INDEXED] = remap_table[data[INDEXED]];
else
data[INDEXED] = 0;
data += bpp;
}