ImageTools.IO.Jpeg.JpegDecoder.IsSupportedFileFormat C# (CSharp) Method

IsSupportedFileFormat() public method

Indicates if the image decoder supports the specified file header.
/// is null (Nothing in Visual Basic).
public IsSupportedFileFormat ( byte header ) : bool
header byte The file header.
return bool
        public bool IsSupportedFileFormat(byte[] header)
        {
            Guard.NotNull(header, "header");

            bool isSupported = false;

            if (header.Length >= 11)
            {
                bool isJpeg = IsJpeg(header);
                bool isExif = IsExif(header);

                isSupported = isJpeg || isExif;
            }

            return isSupported;
        }