[devel] Added expand_16 suppport to the high level interface.

This commit is contained in:
John Bowler 2011-05-08 22:48:12 -05:00 committed by Glenn Randers-Pehrson
parent a9b34191ae
commit 96cec0e1a3
2 changed files with 7 additions and 1 deletions

View File

@ -1387,6 +1387,12 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
png_set_gray_to_rgb(png_ptr); png_set_gray_to_rgb(png_ptr);
#endif #endif
/* Added at libpng-1.5.3 */
#ifdef PNG_READ_EXPAND_16_SUPPORTED
if (transforms & PNG_TRANSFORM_EXPAND_16)
png_set_expand_16(png_ptr);
#endif
/* We don't handle adding filler bytes */ /* We don't handle adding filler bytes */
/* We use png_read_image and rely on that for interlace handling, but we also /* We use png_read_image and rely on that for interlace handling, but we also

View File

@ -187,7 +187,7 @@ png_set_alpha_mode_fixed(png_structp png_ptr, int mode,
output_gamma = PNG_GAMMA_sRGB; output_gamma = PNG_GAMMA_sRGB;
} }
/* Else validate the value to ensure it is in a reasonable range, the value /* Else validate the value to ensure it is in a reasonable range. The value
* is expected to be 1 or greater, but this range test allows for some * is expected to be 1 or greater, but this range test allows for some
* viewing correction values. The intent is to weed out users of this API * viewing correction values. The intent is to weed out users of this API
* who use the inverse of the gamma value accidentally! Since some of these * who use the inverse of the gamma value accidentally! Since some of these