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

null_convert() private method

Color conversion for no colorspace change: just copy the data, converting from separate-planes to interleaved representation.
private null_convert ( ComponentBuffer input_buf, int input_row, byte output_buf, int output_row, int num_rows ) : void
input_buf ComponentBuffer
input_row int
output_buf byte
output_row int
num_rows int
return void
        private void null_convert(ComponentBuffer[] input_buf, int input_row, byte[][] output_buf, int output_row, int num_rows)
        {
            for (int row = 0; row < num_rows; row++)
            {
                for (int ci = 0; ci < m_cinfo.m_num_components; ci++)
                {
                    int columnIndex = 0;
                    int componentOffset = 0;
                    int perComponentOffset = m_perComponentOffsets[ci];

                    for (int col = 0; col < m_cinfo.m_output_width; col++)
                    {
                        /* needn't bother with GETJSAMPLE() here */
                        output_buf[output_row + row][ci + componentOffset] = input_buf[ci][input_row + perComponentOffset][columnIndex];
                        componentOffset += m_cinfo.m_num_components;
                        columnIndex++;
                    }
                }

                input_row++;
            }
        }