jpeg_read_raw_data -- read raw downsampled image data


#include <jpeglib.h>

JDIMENSION jpeg_read_raw_data(j_decompress_ptr cinfo, JSAMPIMAGE data, JDIMENSION max_lines);


jpeg_read_raw_data() shall return upto max_lines number of scanlines of raw downsampled data into the JSAMPIMAGE array argument. The data buffer must be of atleast max_v_samp_factor*DCTSIZE scanlines as jpeg_read_raw_data() shall return one MCU row per call.

The passed max_lines value must be atleast (cinfo->max_v_samp_factor * DCTSIZE). Before starting the decompression sequence, cinfo->raw_data_out must be set to TRUE.

Return Value

jpeg_read_raw_data() shall return the number of scanlines processed. jpeg_read_raw_data() shall return 0 if the data source is suspended.


jpeg_read_raw_data() shall report error and exit if max_lines is less than (cinfo->max_v_samp_factor*DCTSIZE).