Lines Matching refs:cinfo
80 struct jpeg_compress_struct cinfo;
100 * address which we place into the link field in cinfo.
102 cinfo.err = jpeg_std_error(&jerr);
104 jpeg_create_compress(&cinfo);
118 jpeg_stdio_dest(&cinfo, outfile);
123 * Four fields of the cinfo struct must be filled in:
125 cinfo.image_width = image_width; /* image width and height, in pixels */
126 cinfo.image_height = image_height;
127 cinfo.input_components = 3; /* # of color components per pixel */
128 cinfo.in_color_space = JCS_RGB; /* colorspace of input image */
130 * (You must set at least cinfo.in_color_space before calling this,
133 jpeg_set_defaults(&cinfo);
137 jpeg_set_quality(&cinfo, quality, TRUE /* limit to baseline-JPEG values */);
144 jpeg_start_compress(&cinfo, TRUE);
149 /* Here we use the library's state variable cinfo.next_scanline as the
156 while (cinfo.next_scanline < cinfo.image_height) {
161 row_pointer[0] = & image_buffer[cinfo.next_scanline * row_stride];
162 (void) jpeg_write_scanlines(&cinfo, row_pointer, 1);
167 jpeg_finish_compress(&cinfo);
174 jpeg_destroy_compress(&cinfo);
185 * with this because we were only relying on the value of cinfo.next_scanline,
263 my_error_exit (j_common_ptr cinfo)
265 /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */
266 my_error_ptr myerr = (my_error_ptr) cinfo->err;
270 (*cinfo->err->output_message) (cinfo);
289 struct jpeg_decompress_struct cinfo;
314 cinfo.err = jpeg_std_error(&jerr.pub);
321 jpeg_destroy_decompress(&cinfo);
326 jpeg_create_decompress(&cinfo);
330 jpeg_stdio_src(&cinfo, infile);
334 (void) jpeg_read_header(&cinfo, TRUE);
349 (void) jpeg_start_decompress(&cinfo);
361 row_stride = cinfo.output_width * cinfo.output_components;
363 buffer = (*cinfo.mem->alloc_sarray)
364 ((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1);
369 /* Here we use the library's state variable cinfo.output_scanline as the
372 while (cinfo.output_scanline < cinfo.output_height) {
377 (void) jpeg_read_scanlines(&cinfo, buffer, 1);
384 (void) jpeg_finish_decompress(&cinfo);
392 jpeg_destroy_decompress(&cinfo);