void Convert_P_RGBA_8888_To_BGR_888(ref byte[] scanLine, byte[] source)
{
byte temp = 0;
byte alpha = 0;
for (int x = 0, y=0; x < source.Length; x+=4, y+=3)
{
alpha = source [x + 3]; // Save off alpha
temp = source [x]; // save off red
scanLine [y] = ConversionHelpers.PremultiplyValue(alpha,source [x + 2]); // move blue to red
scanLine [y + 1] = ConversionHelpers.PremultiplyValue(alpha,source [x + 1]);
scanLine [y + 2] = ConversionHelpers.PremultiplyValue(alpha,temp); // move the red to green
// Now we do the cha cha cha
}
}