BitMiracle.LibJpeg.Classic.Internal.jpeg_color_converter.null_convert C# (CSharp) Method

null_convert() private method

Convert some rows of samples to the JPEG colorspace. This version handles multi-component colorspaces without conversion. We assume input_components == num_components.
private null_convert ( byte input_buf, int input_row, byte output_buf, int output_row, int num_rows ) : void
input_buf byte
input_row int
output_buf byte
output_row int
num_rows int
return void
        private void null_convert(byte[][] input_buf, int input_row, byte[][][] output_buf, int output_row, int num_rows)
        {
            int nc = m_cinfo.m_num_components;
            int num_cols = m_cinfo.m_image_width;

            for (int row = 0; row < num_rows; row++)
            {
                /* It seems fastest to make a separate pass for each component. */
                for (int ci = 0; ci < nc; ci++)
                {
                    int columnOffset = 0;
                    for (int col = 0; col < num_cols; col++)
                    {
                        /* don't need GETJSAMPLE() here */
                        output_buf[ci][output_row][col] = input_buf[input_row + row][columnOffset + ci];
                        columnOffset += nc;
                    }
                }

                output_row++;
            }
        }
    }