32 #if BITS_IN_JSAMPLE != 8 33 Sorry,
this code only copes with 8-bit JSAMPLEs.
51 #define CMAPLENGTH (1<<(CMAPBITS)) 62 typedef rle_dest_struct * rle_dest_ptr;
79 rle_dest_ptr dest = (rle_dest_ptr) dinfo;
82 #ifdef PROGRESS_REPORT 105 ERREXIT(cinfo, JERR_RLE_COLORSPACE);
112 dest->colormap =
NULL;
117 dest->colormap = (rle_map *) (*cinfo->mem->alloc_small)
119 MEMZERO(dest->colormap, cmapsize);
125 dest->colormap[ci * CMAPLENGTH +
i] =
132 dest->pub.buffer = (*cinfo->mem->access_virt_sarray)
134 dest->pub.buffer_height = 1;
136 dest->pub.put_pixel_rows = rle_put_pixel_rows;
138 #ifdef PROGRESS_REPORT 139 if (progress !=
NULL) {
156 rle_dest_ptr dest = (rle_dest_ptr) dinfo;
159 dest->pub.
buffer = (*cinfo->mem->access_virt_sarray)
174 rle_dest_ptr dest = (rle_dest_ptr) dinfo;
178 char cmapcomment[80];
181 #ifdef PROGRESS_REPORT 186 header = *rle_hdr_init(
NULL);
187 header.rle_file = dest->pub.output_file;
195 RLE_SET_BIT(header, ci);
199 header.cmaplen = CMAPBITS;
200 header.cmap = dest->colormap;
203 rle_putcom(cmapcomment, &header);
207 rle_put_setup(&header);
214 #ifdef PROGRESS_REPORT 215 if (progress !=
NULL) {
224 rle_row = (rle_pixel **) (*cinfo->mem->access_virt_sarray)
227 rle_putrow(rle_row, (
int) cinfo->
output_width, &header);
228 #ifdef PROGRESS_REPORT 229 if (progress !=
NULL) {
237 rle_row = (rle_pixel **) dest->rle_row;
238 output_row = * (*cinfo->mem->access_virt_sarray)
249 rle_putrow(rle_row, (
int) cinfo->
output_width, &header);
250 #ifdef PROGRESS_REPORT 251 if (progress !=
NULL) {
259 #ifdef PROGRESS_REPORT 260 if (progress !=
NULL)
266 fflush(dest->pub.output_file);
267 if (ferror(dest->pub.output_file))
268 ERREXIT(cinfo, JERR_FILE_WRITE);
282 dest = (rle_dest_ptr)
285 dest->pub.start_output = start_output_rle;
286 dest->pub.finish_output = finish_output_rle;
292 dest->rle_row = (*cinfo->mem->alloc_sarray)
297 dest->image = (*cinfo->mem->request_virt_sarray)
struct jpeg_common_struct * j_common_ptr
GLenum GLsizei GLenum GLenum const GLvoid * image
#define GETJSAMPLE(value)
#define ERREXIT(cinfo, code)
jpeg_calc_output_dimensions(j_decompress_ptr cinfo)
J_COLOR_SPACE out_color_space
GLenum GLenum GLvoid * row
struct jpeg_progress_mgr pub
#define ERREXIT1(cinfo, code, p1)
if(!abbox) return FT_THROW(Invalid_Argument)
JDIMENSION output_scanline
int completed_extra_passes
struct cdjpeg_progress_mgr * cd_progress_ptr
#define ERREXIT2(cinfo, code, p1, p2)
struct jvirt_sarray_control * jvirt_sarray_ptr
#define MEMZERO(target, size)
int actual_number_of_colors