libjpeg API: Partial scanline decompression
This, in combination with the existing jpeg_skip_scanlines() function,
provides the ability to crop the image both horizontally and vertically
while decompressing (certain restrictions apply-- see libjpeg.txt.)
This also cleans up the documentation of the line skipping feature and
removes the "strip decompression" feature from djpeg, since the new
cropping feature is a superset of it.
Refer to #34 for discussion.
Closes #34
Cherry picked from upstream:
https://github.com/libjpeg-turbo/libjpeg-turbo/commit/3ab68cf563f6edc2608c085f5c8b2d5d5c61157e
BUG:27290496
Change-Id: Id11312fa43959531bc6bea04ebb657c6e1140363
diff --git a/wrppm.c b/wrppm.c
index d3a613c..ad8b49d 100644
--- a/wrppm.c
+++ b/wrppm.c
@@ -19,6 +19,7 @@
*/
#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
+#include "wrppm.h"
#ifdef PPM_SUPPORTED
@@ -61,21 +62,6 @@
*/
-/* Private version of data destination object */
-
-typedef struct {
- struct djpeg_dest_struct pub; /* public fields */
-
- /* Usually these two pointers point to the same place: */
- char *iobuffer; /* fwrite's I/O buffer */
- JSAMPROW pixrow; /* decompressor output buffer */
- size_t buffer_width; /* width of I/O buffer */
- JDIMENSION samples_per_row; /* JSAMPLEs per output row */
-} ppm_dest_struct;
-
-typedef ppm_dest_struct * ppm_dest_ptr;
-
-
/*
* Write some pixel data.
* In this module rows_supplied will always be 1.