BitMiracle.LibJpeg.Classic.Internal.jpeg_downsampler.expand_right_edge C# (CSharp) Method

expand_right_edge() private static method

Expand a component horizontally from width input_cols to width output_cols, by duplicating the rightmost samples.
private static expand_right_edge ( byte image_data, int startInputRow, int num_rows, int input_cols, int output_cols ) : void
image_data byte
startInputRow int
num_rows int
input_cols int
output_cols int
return void
        private static void expand_right_edge(byte[][] image_data, int startInputRow, int num_rows, int input_cols, int output_cols)
        {
            int numcols = output_cols - input_cols;
            if (numcols > 0)
            {
                for (int row = startInputRow; row < (startInputRow + num_rows); row++)
                {
                    /* don't need GETJSAMPLE() here */
                    byte pixval = image_data[row][input_cols - 1];
                    for (int count = 0; count < numcols; count++)
                        image_data[row][input_cols + count] = pixval;
                }
            }
        }
    }