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

get_dri() private method

Process a DRI marker
private get_dri ( ) : bool
return bool
        private bool get_dri()
        {
            int length;
            if (!m_cinfo.m_src.GetTwoBytes(out length))
                return false;

            if (length != 4)
                m_cinfo.ERREXIT(J_MESSAGE_CODE.JERR_BAD_LENGTH);

            int temp = 0;
            if (!m_cinfo.m_src.GetTwoBytes(out temp))
                return false;

            int tmp = temp;
            m_cinfo.TRACEMS(1, J_MESSAGE_CODE.JTRC_DRI, tmp);
            m_cinfo.m_restart_interval = tmp;

            return true;
        }