CSJ2K.Util.BitmapImageSource.GetRangeBits C# (CSharp) Метод

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

private static GetRangeBits ( PixelFormat pixelFormat ) : int
pixelFormat PixelFormat
Результат int
        private static int GetRangeBits(PixelFormat pixelFormat)
        {
            switch (pixelFormat)
            {
                case PixelFormat.Format16bppGrayScale:
                    return 16;
                case PixelFormat.Format1bppIndexed:
                    return 1;
                case PixelFormat.Format4bppIndexed:
                    return 4;
                case PixelFormat.Format8bppIndexed:
                case PixelFormat.Format24bppRgb:
                case PixelFormat.Format32bppArgb:
                case PixelFormat.Format32bppPArgb:
                case PixelFormat.Format32bppRgb:
                    return 8;
                default:
                    throw new ArgumentOutOfRangeException("pixelFormat");
            }
        }