BBX.Web.UI.AttachUploadPage.IsPixelFormatIndexed(System.Drawing.Imaging.PixelFormat)

Here are the examples of the csharp api class BBX.Web.UI.AttachUploadPage.IsPixelFormatIndexed(System.Drawing.Imaging.PixelFormat) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Example 7

1. Example

Project: BBX
Source File: AttachUploadPage.cs
static Image Process(Image img)
        {
            if (!IsPixelFormatIndexed(img.PixelFormat)) return img;

            var bmp = new Bitmap(img.Width, img.Height, PixelFormat.Format32bppArgb);
            using (var g = Graphics.FromImage(bmp))
            {
                g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
                g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
                g.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
                g.DrawImage(img, 0, 0);
            }

            return bmp;
        }