getAlpha method
Get the alpha channel of the palette entry at index
. If the palette has
fewer colors or channels, 0 will be returned.
Implementation
@override
num getAlpha(int index) {
if (numChannels < 4) {
return 0;
}
index *= numChannels;
return data[index + 3];
}