jpeg_set_colorspace

Name

jpeg_set_colorspace -- set JPEG file's colorspace

Synopsis

#include <jpeglib.h>

void jpeg_set_colorspace(j_compress_ptr cinfo, J_COLOR_SPACE colorspace);

Description

jpeg_set_colorspace() shall set the JPEG file's colorspace to the given color space. The function may change the value of other compression parameters that are dependent on color space.

Errors

jpeg_set_colorspace() shall return error and exit if the state of the compression object indicates that the compression cycle has started.