BitMiracle.LibJpeg.Classic.Internal.jpeg_marker_reader.skip_variable C# (CSharp) Method

skip_variable() private static method

Skip over an unknown or uninteresting variable-length marker
private static skip_variable ( jpeg_decompress_struct cinfo ) : bool
cinfo jpeg_decompress_struct
return bool
        private static bool skip_variable(jpeg_decompress_struct cinfo)
        {
            int length;
            if (!cinfo.m_src.GetTwoBytes(out length))
                return false;

            length -= 2;

            cinfo.TRACEMS(1, J_MESSAGE_CODE.JTRC_MISC_MARKER, cinfo.m_unread_marker, length);

            if (length > 0)
                cinfo.m_src.skip_input_data(length);

            return true;
        }