CSharpImageLibrary.ImageFormats.MaxNumberOfChannels C# (CSharp) Method

MaxNumberOfChannels() public static method

Gets maximum number of channels a format can contain. NOTE: This likely isn't actually the max number. i.e. None exceed four, but some are only one or two channels.
public static MaxNumberOfChannels ( ImageEngineFormat format ) : int
format ImageEngineFormat Format to channel count.
return int
        public static int MaxNumberOfChannels(ImageEngineFormat format)
        {
            var estimate = GetBlockSize(format);

            // DXT and non-DDS
            if (estimate > 4 || estimate == 1)
                return 4;
            else
                return estimate;
        }