From 4e4876104d524d578b59be4981769edf4cce4c4d Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Thu, 26 Aug 2010 21:41:04 -0500 Subject: [PATCH] [devel] conditionally compile parts of png.c depending on PNG_16BIT_SUPPORTED --- png.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/png.c b/png.c index b26863773..eccaae504 100644 --- a/png.c +++ b/png.c @@ -2331,15 +2331,19 @@ png_build_gamma_table(png_structp png_ptr, int bit_depth) png_ptr->gamma_shift = shift; +#ifdef PNG_16BIT_SUPPORTED if (png_ptr->transformations & (PNG_16_TO_8 | PNG_BACKGROUND)) +#endif png_build_16to8_table(png_ptr, &png_ptr->gamma_16_table, shift, png_ptr->screen_gamma > 0 ? png_product2(png_ptr->gamma, png_ptr->screen_gamma) : PNG_FP_1); +#ifdef PNG_16BIT_SUPPORTED else png_build_16bit_table(png_ptr, &png_ptr->gamma_16_table, shift, png_ptr->screen_gamma > 0 ? png_reciprocal2(png_ptr->gamma, png_ptr->screen_gamma) : PNG_FP_1); +#endif #if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)