00001 /* 00002 * cdjpeg.h 00003 * 00004 * Copyright (C) 1994-1996, Thomas G. Lane. 00005 * This file is part of the Independent JPEG Group's software. 00006 * For conditions of distribution and use, see the accompanying README file. 00007 * 00008 * This file contains common declarations for the sample applications 00009 * cjpeg and djpeg. It is NOT used by the core JPEG library. 00010 */ 00011 00012 #define JPEG_CJPEG_DJPEG /* define proper options in jconfig.h */ 00013 #define JPEG_INTERNAL_OPTIONS /* cjpeg.c,djpeg.c need to see xxx_SUPPORTED */ 00014 #include "sane/sanei_jinclude.h" 00015 #include "jpeglib.h" 00016 #include "jerror.h" /* get library error codes too */ 00017 #include "sane/sanei_cderror.h" /* get application-specific error codes */ 00018 00019 /* 00020 * Object interface for djpeg's output file encoding modules 00021 */ 00022 00023 typedef struct djpeg_dest_struct * djpeg_dest_ptr; 00024 00025 struct djpeg_dest_struct { 00026 /* start_output is called after jpeg_start_decompress finishes. 00027 * The color map will be ready at this time, if one is needed. 00028 */ 00029 JMETHOD(void, start_output, (j_decompress_ptr cinfo, 00030 djpeg_dest_ptr dinfo)); 00031 /* Emit the specified number of pixel rows from the buffer. */ 00032 JMETHOD(void, put_pixel_rows, (j_decompress_ptr cinfo, 00033 djpeg_dest_ptr dinfo, 00034 JDIMENSION rows_supplied, 00035 char *data)); 00036 /* Finish up at the end of the image. */ 00037 JMETHOD(void, finish_output, (j_decompress_ptr cinfo, 00038 djpeg_dest_ptr dinfo)); 00039 00040 /* Target file spec; filled in by djpeg.c after object is created. */ 00041 FILE * output_file; 00042 00043 /* Output pixel-row buffer. Created by module init or start_output. 00044 * Width is cinfo->output_width * cinfo->output_components; 00045 * height is buffer_height. 00046 */ 00047 JSAMPARRAY buffer; 00048 JDIMENSION buffer_height; 00049 }; 00050 00051 /* Module selection routines for I/O modules. */ 00052 00053 EXTERN(djpeg_dest_ptr) sanei_jpeg_jinit_write_ppm JPP((j_decompress_ptr cinfo)); 00054 00055 /* miscellaneous useful macros */
1.5.1