BitMiracle.LibJpeg.Classic.Internal.jpeg_c_prep_controller.start_pass C# (CSharp) Method

start_pass() public method

Initialize for a processing pass.
public start_pass ( J_BUF_MODE pass_mode ) : void
pass_mode J_BUF_MODE
return void
        public void start_pass(J_BUF_MODE pass_mode)
        {
            if (pass_mode != J_BUF_MODE.JBUF_PASS_THRU)
                m_cinfo.ERREXIT(J_MESSAGE_CODE.JERR_BAD_BUFFER_MODE);

            /* Initialize total-height counter for detecting bottom of image */
            m_rows_to_go = m_cinfo.m_image_height;

            /* Mark the conversion buffer empty */
            m_next_buf_row = 0;

            /* Preset additional state variables for context mode.
             * These aren't used in non-context mode, so we needn't test which mode.
             */
            m_this_row_group = 0;

            /* Set next_buf_stop to stop after two row groups have been read in. */
            m_next_buf_stop = 2 * m_cinfo.m_max_v_samp_factor;
        }