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
diff --git a/wrppm.c b/wrppm.c
index 7d13e2d..40fbf1f 100644
--- a/wrppm.c
+++ b/wrppm.c
@@ -20,6 +20,7 @@
*/
#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
+#include "wrppm.h"
#ifdef PPM_SUPPORTED
@@ -62,21 +63,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.