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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user