19 #define JPEG_INTERNALS 39 ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE,
50 void * client_data = cinfo->client_data;
53 cinfo->client_data = client_data;
55 cinfo->is_decompressor =
FALSE;
61 cinfo->progress =
NULL;
64 cinfo->comp_info =
NULL;
67 cinfo->quant_tbl_ptrs[i] =
NULL;
70 cinfo->dc_huff_tbl_ptrs[
i] =
NULL;
71 cinfo->ac_huff_tbl_ptrs[
i] =
NULL;
74 cinfo->script_space =
NULL;
76 cinfo->input_gamma = 1.0;
126 if ((qtbl = cinfo->quant_tbl_ptrs[
i]) !=
NULL)
131 if ((htbl = cinfo->dc_huff_tbl_ptrs[
i]) !=
NULL)
133 if ((htbl = cinfo->ac_huff_tbl_ptrs[
i]) !=
NULL)
154 if (cinfo->next_scanline < cinfo->image_height)
155 ERREXIT(cinfo, JERR_TOO_LITTLE_DATA);
156 (*cinfo->master->finish_pass) (cinfo);
158 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
160 while (! cinfo->master->is_last_pass) {
161 (*cinfo->master->prepare_for_pass) (cinfo);
162 for (iMCU_row = 0; iMCU_row < cinfo->total_iMCU_rows; iMCU_row++) {
163 if (cinfo->progress !=
NULL) {
164 cinfo->progress->pass_counter = (
long) iMCU_row;
165 cinfo->progress->pass_limit = (
long) cinfo->total_iMCU_rows;
166 (*cinfo->progress->progress_monitor) ((
j_common_ptr) cinfo);
172 ERREXIT(cinfo, JERR_CANT_SUSPEND);
174 (*cinfo->master->finish_pass) (cinfo);
177 (*cinfo->marker->write_file_trailer) (cinfo);
178 (*cinfo->dest->term_destination) (cinfo);
197 if (cinfo->next_scanline != 0 ||
201 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
203 (*cinfo->marker->write_marker_header) (cinfo,
marker,
datalen);
206 (*write_marker_byte) (cinfo, *
dataptr);
216 if (cinfo->next_scanline != 0 ||
220 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
222 (*cinfo->marker->write_marker_header) (cinfo,
marker,
datalen);
228 (*cinfo->marker->write_marker_byte) (cinfo,
val);
257 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
261 (*cinfo->dest->init_destination) (cinfo);
265 (*cinfo->marker->write_tables_only) (cinfo);
267 (*cinfo->dest->term_destination) (cinfo);
for(n=1;n< outline->n_points;n++)
jpeg_finish_compress(j_compress_ptr cinfo)
struct jpeg_common_struct * j_common_ptr
jpeg_destroy_compress(j_compress_ptr cinfo)
#define ERREXIT(cinfo, code)
jpeg_CreateCompress(j_compress_ptr cinfo, int version, size_t structsize)
int const JOCTET unsigned int datalen
jpeg_suppress_tables(j_compress_ptr cinfo, boolean suppress)
write_marker_byte(j_compress_ptr cinfo, int val)
jpeg_abort(j_common_ptr cinfo)
jpeg_write_marker(j_compress_ptr cinfo, int marker, const JOCTET *dataptr, unsigned int datalen)
jinit_memory_mgr(j_common_ptr cinfo)
#define JMETHOD(type, methodname, arglist)
typedef long(ZCALLBACK *tell_file_func) OF((voidpf opaque
#define ERREXIT1(cinfo, code, p1)
jpeg_abort_compress(j_compress_ptr cinfo)
jinit_marker_writer(j_compress_ptr cinfo)
jpeg_write_m_byte(j_compress_ptr cinfo, int val)
jpeg_write_m_header(j_compress_ptr cinfo, int marker, unsigned int datalen)
int const JOCTET * dataptr
jpeg_write_tables(j_compress_ptr cinfo)
jpeg_destroy(j_common_ptr cinfo)
#define ERREXIT2(cinfo, code, p1, p2)
#define MEMZERO(target, size)