You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Palette.Index, and by extension image.Paletted.Set, cannot distinguish between image.Black and image.Transparent (and in general, any fully-transparent color or partially-transparent black) because it ignores the alpha channel of the colors when searching for the closet match.
This makes it impossible to draw a black pixel onto an image.Paletted whose palette contains color.Transparent, even if it also contains color.Black (or the other way around, depending on the order of the colors in the palette).
Palette.Index, and by extension image.Paletted.Set, cannot distinguish between image.Black and image.Transparent (and in general, any fully-transparent color or partially-transparent black) because it ignores the alpha channel of the colors when searching for the closet match.
This makes it impossible to draw a black pixel onto an image.Paletted whose palette contains color.Transparent, even if it also contains color.Black (or the other way around, depending on the order of the colors in the palette).
See this example program: http://play.golang.org/p/29G2978Px7
In general, it seems like p.Convert(c) should equal c, for every color.Palette p and color.Color c in p.
The text was updated successfully, but these errors were encountered: