BitMiracle.LibJpeg.Classic.Internal.jpeg_marker_writer.emit_lse_ict C# (CSharp) Method

emit_lse_ict() private method

Emit an LSE inverse color transform specification marker
private emit_lse_ict ( ) : void
return void
        private void emit_lse_ict()
        {
            /* Support only 1 transform */
            if (m_cinfo.color_transform != J_COLOR_TRANSFORM.JCT_SUBTRACT_GREEN || m_cinfo.Num_components < 3)
                m_cinfo.ERREXIT(J_MESSAGE_CODE.JERR_CONVERSION_NOTIMPL);

            emit_marker(JPEG_MARKER.JPG8);

            emit_2bytes(24); /* fixed length */

            emit_byte(0x0D); /* ID inverse transform specification */
            emit_2bytes(JpegConstants.MAXJSAMPLE); /* MAXTRANS */
            emit_byte(3);        /* Nt=3 */
            emit_byte(m_cinfo.Component_info[1].Component_id);
            emit_byte(m_cinfo.Component_info[0].Component_id);
            emit_byte(m_cinfo.Component_info[2].Component_id);
            emit_byte(0x80); /* F1: CENTER1=1, NORM1=0 */
            emit_2bytes(0);  /* A(1,1)=0 */
            emit_2bytes(0);  /* A(1,2)=0 */
            emit_byte(0);    /* F2: CENTER2=0, NORM2=0 */
            emit_2bytes(1);  /* A(2,1)=1 */
            emit_2bytes(0);  /* A(2,2)=0 */
            emit_byte(0);    /* F3: CENTER3=0, NORM3=0 */
            emit_2bytes(1);  /* A(3,1)=1 */
            emit_2bytes(0);  /* A(3,2)=0 */
        }