BlackBerry.Screen.PixelFormatExtensions.ToSDI C# (CSharp) Method

ToSDI() public static method

public static ToSDI ( this me ) : System.Drawing.Imaging.PixelFormat
me this
return System.Drawing.Imaging.PixelFormat
        public static System.Drawing.Imaging.PixelFormat ToSDI(this PixelFormat me)
        {
            switch (me) {
            case PixelFormat.SCREEN_FORMAT_RGB888:
                return System.Drawing.Imaging.PixelFormat.Format24bppRgb;
            case PixelFormat.SCREEN_FORMAT_RGBA8888:
                return System.Drawing.Imaging.PixelFormat.Format32bppArgb;
            case PixelFormat.SCREEN_FORMAT_RGBX8888:
                return System.Drawing.Imaging.PixelFormat.Format32bppRgb;
            default:
                throw new Exception ("Unsupported image format: " + me);
            }
        }
PixelFormatExtensions