diff --git a/pngread.c b/pngread.c index 910f1b299..b75dfb299 100644 --- a/pngread.c +++ b/pngread.c @@ -1387,6 +1387,12 @@ png_read_png(png_structp png_ptr, png_infop info_ptr, png_set_gray_to_rgb(png_ptr); #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 use png_read_image and rely on that for interlace handling, but we also diff --git a/pngrtran.c b/pngrtran.c index 52c44cac4..cdf84cedb 100644 --- a/pngrtran.c +++ b/pngrtran.c @@ -187,7 +187,7 @@ png_set_alpha_mode_fixed(png_structp png_ptr, int mode, 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 * 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