jpeg_read_scanlines -- read scanlines of data from JPEG decompressor


#include <jpeglib.h>

JDIMENSION jpeg_read_scanlines(j_decompress_ptr cinfo, JSAMPARRAY scanlines, JDIMENSION max_lines);


jpeg_read_scanlines() shall return upto the maximum number of scanlines of decompressed image data. This may be less than the number requested in cases such as bottom of image, data source suspension, and operating modes that emit multiple scanlines at a time. Image data shall be returned in top-to-bottom scanline order.

Return Value

On success, jpeg_read_scanlines() shall return the number of lines actually read.


jpeg_read_scanlines() shall report a non-fatal error if the requested number of scanlines is greater than the height of the original unscaled image.