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

ToBB() public static method

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