/* Color conversion for grayscale: just copy the data. This also works for YCC -> grayscale conversion, in which we just copy the Y (luminance) component and ignore chrominance.  */
grayscale_convert(j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION input_row, JSAMPARRAY output_buf, int num_rows)
/* Color conversion for grayscale: just copy the data. This also works for YCC -> grayscale conversion, in which we just copy the Y (luminance) component and ignore chrominance.  */
grayscale_convert(j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION input_row, JSAMPARRAY output_buf, int num_rows)
{
  jcopy_sample_rows(input_buf[0], (int) input_row, output_buf, 0,
		    num_rows, cinfo->output_width);
}