Bitmap FixAlpha(Bitmap bmp)
{
if (bmp.PixelFormat != PixelFormat.Format32bppRgb)
return bmp;
var data = bmp.LockBits(new Rectangle(Point.Empty, bmp.Size), ImageLockMode.ReadOnly, PixelFormat.Format32bppRgb);
var bma = new Bitmap(bmp.Width, bmp.Height, bmp.Width * 4, PixelFormat.Format32bppArgb, data.Scan0);
bmp.UnlockBits(data);
return bma;
}