Lines Matching refs:we
69 * For this example, we'll assume that this data structure matches the way
70 * our application has stored the image in memory, so we can just pass a
97 * (see the second half of this file for an example). But here we just
114 * address which we place into the link field in cinfo.
117 /* Now we can initialize the JPEG compression object. */
123 /* Here we use the library-supplied code to send compressed data to a
136 /* First we supply a description of the input image.
149 * Here we just illustrate the use of quality (quantization table) scaling:
155 /* TRUE ensures that we will write a complete interchange-JPEG file.
163 /* Here we use the library's state variable cinfo.next_scanline as the
164 * loop counter, so that we don't have to keep track ourselves.
165 * To keep things simple, we pass one scanline per call; you can pass
182 /* After finish_compress, we can close the output file. */
190 /* And we're done! */
197 * In the above loop, we ignored the return value of jpeg_write_scanlines,
199 * with this because we were only relying on the value of cinfo.next_scanline,
227 * It's a bit more refined than the above, in that we show:
231 * Just to make this example a little different from the first one, we'll
232 * assume that we do not intend to put the whole image into an in-memory
234 * scanline-high JSAMPLE array as a work buffer, and we will let the JPEG
236 * because we don't need to remember to deallocate the buffer separately: it
256 * longjmp(). But we need to make the setjmp buffer accessible to the
257 * error_exit routine. To do this, we make a private extension of the
258 * standard JPEG error handler object. (If we were using C++, we'd say we
283 /* We could postpone this until after returning, if we chose. */
331 /* In this example we want to open the input file before doing anything else,
349 /* If we get here, the JPEG code has signaled an error.
356 /* Now we can initialize the JPEG decompression object. */
368 * (b) we passed TRUE to reject a tables-only JPEG file as an error.
374 /* In this example, we don't need to change any of the defaults set by
375 * jpeg_read_header(), so we do nothing here.
386 * the data. After jpeg_start_decompress() we have the correct scaled
388 * if we asked for color quantization.
389 * In this example, we need to make an output work buffer of the right size.
400 /* Here we use the library's state variable cinfo->output_scanline as the
401 * loop counter, so that we don't have to keep track ourselves.
425 /* After finish_decompress, we can close the input file.
426 * Here we postpone it until after no more JPEG errors are possible,
436 /* And we're done! */
444 * In the above code, we ignored the return value of jpeg_read_scanlines,
446 * this because we asked for only one line at a time and we weren't using
450 * we should have done it beforehand to ensure that the space would be
452 * code would risk an out-of-memory error. However, in general we don't
453 * know the output image dimensions before jpeg_start_decompress(), unless we