blob: 2a50544e9797c2ad1504a896e5f0617d0e16928b [file] [log] [blame]
DRC22048202015-01-08 06:18:33 +00001/*
2 * jcsample.h
3 *
4 * This file was part of the Independent JPEG Group's software:
5 * Copyright (C) 1991-1996, Thomas G. Lane.
DRC7e3acc02015-10-10 10:25:46 -05006 * For conditions of distribution and use, see the accompanying README.ijg
7 * file.
DRC22048202015-01-08 06:18:33 +00008 */
9
10LOCAL(void)
11expand_right_edge (JSAMPARRAY image_data, int num_rows,
12 JDIMENSION input_cols, JDIMENSION output_cols)
13{
14 register JSAMPROW ptr;
15 register JSAMPLE pixval;
16 register int count;
17 int row;
18 int numcols = (int) (output_cols - input_cols);
19
20 if (numcols > 0) {
21 for (row = 0; row < num_rows; row++) {
22 ptr = image_data[row] + input_cols;
23 pixval = ptr[-1]; /* don't need GETJSAMPLE() here */
24 for (count = numcols; count > 0; count--)
25 *ptr++ = pixval;
26 }
27 }
28}