public static UInt32 BgraToUInt32(byte b, byte g, byte r, byte a) { return (uint)b + ((uint)g << 8) + ((uint)r << 16) + ((uint)a << 24); }