BitMiracle.LibJpeg.Classic.jpeg_decompress_struct.jpeg_start_output C# (CSharp) Method

jpeg_start_output() public method

Initialize for an output pass in buffered-image mode.
public jpeg_start_output ( int scan_number ) : bool
scan_number int Indicates which scan of the input file is to be displayed; /// the scans are numbered starting at 1 for this purpose.
return bool
        public bool jpeg_start_output(int scan_number)
        {
            if (m_global_state != JpegState.DSTATE_BUFIMAGE && m_global_state != JpegState.DSTATE_PRESCAN)
                ERREXIT(J_MESSAGE_CODE.JERR_BAD_STATE, (int)m_global_state);

            /* Limit scan number to valid range */
            if (scan_number <= 0)
                scan_number = 1;

            if (m_inputctl.EOIReached() && scan_number > m_input_scan_number)
                scan_number = m_input_scan_number;

            m_output_scan_number = scan_number;
            /* Perform any dummy output passes, and set up for the real pass */
            return output_pass_setup();
        }