405 "conflicting calls to set alpha mode and background");
406
407 png_ptr->transformations |= PNG_COMPOSE;
408 }
409 }
410
411 # ifdef PNG_FLOATING_POINT_SUPPORTED
412 void PNGAPI
413 png_set_alpha_mode(png_structrp png_ptr, int mode, double output_gamma)
414 {
415 png_set_alpha_mode_fixed(png_ptr, mode, convert_gamma_value(png_ptr,
416 output_gamma));
417 }
418 # endif
419 #endif
420
421 #ifdef PNG_READ_QUANTIZE_SUPPORTED
422 /* Dither file to 8-bit. Supply a palette, the current number
423 * of elements in the palette, the maximum number of elements
424 * allowed, and a histogram if possible. If the current number
425 * of colors is greater then the maximum number, the palette will be
426 * modified to fit in the maximum number. "full_quantize" indicates
427 * whether we need a quantizing cube set up for RGB images, or if we
428 * simply are reducing the number of colors in a paletted image.
429 */
430
431 typedef struct png_dsort_struct
432 {
433 struct png_dsort_struct * next;
434 png_byte left;
435 png_byte right;
436 } png_dsort;
437 typedef png_dsort * png_dsortp;
438 typedef png_dsort * * png_dsortpp;
439
440 void PNGAPI
441 png_set_quantize(png_structrp png_ptr, png_colorp palette,
442 int num_palette, int maximum_colors, png_const_uint_16p histogram,
443 int full_quantize)
444 {
445 png_debug(1, "in png_set_quantize");
|
405 "conflicting calls to set alpha mode and background");
406
407 png_ptr->transformations |= PNG_COMPOSE;
408 }
409 }
410
411 # ifdef PNG_FLOATING_POINT_SUPPORTED
412 void PNGAPI
413 png_set_alpha_mode(png_structrp png_ptr, int mode, double output_gamma)
414 {
415 png_set_alpha_mode_fixed(png_ptr, mode, convert_gamma_value(png_ptr,
416 output_gamma));
417 }
418 # endif
419 #endif
420
421 #ifdef PNG_READ_QUANTIZE_SUPPORTED
422 /* Dither file to 8-bit. Supply a palette, the current number
423 * of elements in the palette, the maximum number of elements
424 * allowed, and a histogram if possible. If the current number
425 * of colors is greater than the maximum number, the palette will be
426 * modified to fit in the maximum number. "full_quantize" indicates
427 * whether we need a quantizing cube set up for RGB images, or if we
428 * simply are reducing the number of colors in a paletted image.
429 */
430
431 typedef struct png_dsort_struct
432 {
433 struct png_dsort_struct * next;
434 png_byte left;
435 png_byte right;
436 } png_dsort;
437 typedef png_dsort * png_dsortp;
438 typedef png_dsort * * png_dsortpp;
439
440 void PNGAPI
441 png_set_quantize(png_structrp png_ptr, png_colorp palette,
442 int num_palette, int maximum_colors, png_const_uint_16p histogram,
443 int full_quantize)
444 {
445 png_debug(1, "in png_set_quantize");
|