AvatarPreview.frmAvatar.ConvertToRGB C# (CSharp) Метод

ConvertToRGB() приватный статический Метод

private static ConvertToRGB ( System image ) : Image
image System
Результат System.Drawing.Image
        private static System.Drawing.Image ConvertToRGB(System.Drawing.Image image)
        {
            int width = image.Width;
            int height = image.Height;

            Bitmap noAlpha = new Bitmap(width, height, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
            Graphics graphics = Graphics.FromImage(noAlpha);
            graphics.DrawImage(image, 0, 0, width, height);

            return noAlpha;
        }