diff options
author | thestig <thestig@chromium.org> | 2016-08-03 16:29:18 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-03 16:29:18 -0700 |
commit | 6d5c56b44d1821a715f4496668373ac6d1f1d3c6 (patch) | |
tree | 8eea2b264c779be6c35ddaa33f1496dd73300167 /third_party/libpng16/pngrtran.c | |
parent | 96a07863120273c8b89cba0e7d53ef29ae56d580 (diff) | |
download | pdfium-6d5c56b44d1821a715f4496668373ac6d1f1d3c6.tar.xz |
Update libpng to 1.6.22.
Sync up with Chromium's copy of libpng.
Review-Url: https://codereview.chromium.org/2132263002
Diffstat (limited to 'third_party/libpng16/pngrtran.c')
-rw-r--r-- | third_party/libpng16/pngrtran.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/third_party/libpng16/pngrtran.c b/third_party/libpng16/pngrtran.c index f129ef129c..3138147aff 100644 --- a/third_party/libpng16/pngrtran.c +++ b/third_party/libpng16/pngrtran.c @@ -1,8 +1,8 @@ /* pngrtran.c - transforms the data in a row for PNG readers * - * Last changed in libpng 1.6.19 [November 12, 2015] - * Copyright (c) 1998-2015 Glenn Randers-Pehrson + * Last changed in libpng 1.6.22 [May 26, 2016] + * Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -159,7 +159,7 @@ png_set_background(png_structrp png_ptr, png_set_background_fixed(png_ptr, background_color, background_gamma_code, need_expand, png_fixed(png_ptr, background_gamma, "png_set_background")); } -# endif /* FLOATING_POINT */ +# endif /* FLOATING_POINT */ #endif /* READ_BACKGROUND */ /* Scale 16-bit depth files to 8-bit depth. If both of these are set then the @@ -289,9 +289,12 @@ png_set_alpha_mode_fixed(png_structrp png_ptr, int mode, * 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 - * values are reasonable this may have to be changed. + * values are reasonable this may have to be changed: + * + * 1.6.x: changed from 0.07..3 to 0.01..100 (to accomodate the optimal 16-bit + * gamma of 36, and its reciprocal.) */ - if (output_gamma < 70000 || output_gamma > 300000) + if (output_gamma < 1000 || output_gamma > 10000000) png_error(png_ptr, "output gamma out of expected range"); /* The default file gamma is the inverse of the output gamma; the output @@ -1912,7 +1915,7 @@ png_init_read_transformations(png_structrp png_ptr) png_ptr->palette[i].blue = (png_byte)component; } } -#endif /* READ_SHIFT */ +#endif /* READ_SHIFT */ } /* Modify the info structure to reflect the transformations. The |