116 if ((outfile = fopen(filename,
"wb")) == NULL) {
117 fprintf(stderr,
"can't open %s\n", filename);
127 cinfo.image_width = image_width;
128 cinfo.image_height = image_height;
130 cinfo.input_components = 3;
132 cinfo.input_components = 1;
134 cinfo.in_color_space = in_color_space;
161 row_stride = image_width * 3;
163 row_stride = image_width;
165 while (cinfo.next_scanline < cinfo.image_height) {
170 row_pointer[0] = & image_buffer[cinfo.next_scanline * row_stride];
void jpeg_stdio_dest(j_compress_ptr cinfo, FILE *outfile)
Definition: jdatadst.cpp:130
Definition: jpeglib.h:648
struct jpeg_error_mgr * jpeg_std_error(struct jpeg_error_mgr *err)
Definition: jerror.cpp:232
JSAMPLE * JSAMPROW
Definition: jpeglib.h:71
Definition: jpeglib.h:214
void jpeg_start_compress(j_compress_ptr cinfo, boolean write_all_tables)
Definition: jcapistd.cpp:38
#define TRUE
Definition: jpleph.cpp:68
void jpeg_finish_compress(j_compress_ptr cinfo)
Definition: jcapimin.cpp:147
Definition: jpeglib.h:273
JDIMENSION jpeg_write_scanlines(j_compress_ptr cinfo, JSAMPARRAY scanlines, JDIMENSION num_lines)
Definition: jcapistd.cpp:77
void jpeg_set_quality(j_compress_ptr cinfo, int quality, boolean force_baseline)
Definition: jcparam.cpp:132
void jpeg_destroy_compress(j_compress_ptr cinfo)
Definition: jcapimin.cpp:88
void jpeg_set_defaults(j_compress_ptr cinfo)
Definition: jcparam.cpp:268
#define jpeg_create_compress(cinfo)
Definition: jpeglib.h:899