AcManager.Controls.CustomShowroom.CarTextureDialog.SharedBitmapSource.ConvertPixelFormat C# (CSharp) Method

ConvertPixelFormat() private static method

private static ConvertPixelFormat ( System sourceFormat ) : System.Windows.Media.PixelFormat
sourceFormat System
return System.Windows.Media.PixelFormat
            private static System.Windows.Media.PixelFormat ConvertPixelFormat(System.Drawing.Imaging.PixelFormat sourceFormat) {
                switch (sourceFormat) {
                    case System.Drawing.Imaging.PixelFormat.Format24bppRgb:
                        return PixelFormats.Bgr24;

                    case System.Drawing.Imaging.PixelFormat.Format32bppArgb:
                        return PixelFormats.Pbgra32;

                    case System.Drawing.Imaging.PixelFormat.Format32bppRgb:
                        return PixelFormats.Bgr32;

                }
                return new System.Windows.Media.PixelFormat();
            }