diff options
Diffstat (limited to 'png.c')
-rw-r--r-- | png.c | 27 |
1 files changed, 14 insertions, 13 deletions
@@ -1,7 +1,7 @@ /* png.c - location for general purpose libpng functions * - * Last changed in libpng 1.6.12 [June 12, 2014] + * Last changed in libpng 1.6.14 [October 23, 2014] * Copyright (c) 1998-2014 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.) @@ -14,7 +14,7 @@ #include "pngpriv.h" /* Generate a compiler error if there is an old png.h in the search path. */ -typedef png_libpng_version_1_6_13 Your_png_h_is_not_version_1_6_13; +typedef png_libpng_version_1_6_14 Your_png_h_is_not_version_1_6_14; /* Tells libpng that we have already handled the first "num_bytes" bytes * of the PNG file signature. If the PNG data is embedded into another @@ -773,13 +773,13 @@ png_get_copyright(png_const_structrp png_ptr) #else # ifdef __STDC__ return PNG_STRING_NEWLINE \ - "libpng version 1.6.13 - August 21, 2014" PNG_STRING_NEWLINE \ + "libpng version 1.6.14 - October 23, 2014" PNG_STRING_NEWLINE \ "Copyright (c) 1998-2014 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \ "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \ "Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \ PNG_STRING_NEWLINE; # else - return "libpng version 1.6.13 - August 21, 2014\ + return "libpng version 1.6.14 - October 23, 2014\ Copyright (c) 1998-2014 Glenn Randers-Pehrson\ Copyright (c) 1996-1997 Andreas Dilger\ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc."; @@ -2219,10 +2219,12 @@ png_compare_ICC_profile_with_sRGB(png_const_structrp png_ptr, #endif unsigned int i; +#ifdef PNG_SET_OPTION_SUPPORTED /* First see if PNG_SKIP_sRGB_CHECK_PROFILE has been set to "on" */ if (((png_ptr->options >> PNG_SKIP_sRGB_CHECK_PROFILE) & 3) == PNG_OPTION_ON) return 0; +#endif for (i=0; i < (sizeof png_sRGB_checks) / (sizeof png_sRGB_checks[0]); ++i) { @@ -3569,8 +3571,8 @@ png_log16bit(png_uint_32 x) * each case only the low 16 bits are relevant - the fraction - since the * integer bits (the top 4) simply determine a shift. * - * The worst case is the 16-bit distinction between 65535 and 65534, this - * requires perhaps spurious accuracty in the decoding of the logarithm to + * The worst case is the 16-bit distinction between 65535 and 65534. This + * requires perhaps spurious accuracy in the decoding of the logarithm to * distinguish log2(65535/65534.5) - 10^-5 or 17 bits. There is little chance * of getting this accuracy in practice. * @@ -3658,7 +3660,7 @@ png_exp8bit(png_fixed_point lg2) /* Get a 32-bit value: */ png_uint_32 x = png_exp(lg2); - /* Convert the 32-bit value to 0..255 by multiplying by 256-1, note that the + /* Convert the 32-bit value to 0..255 by multiplying by 256-1. Note that the * second, rounding, step can't overflow because of the first, subtraction, * step. */ @@ -3840,7 +3842,7 @@ png_build_16to8_table(png_structrp png_ptr, png_uint_16pp *ptable, /* 'num' is the number of tables and also the number of low bits of low * bits of the input 16-bit value used to select a table. Each table is - * itself index by the high 8 bits of the value. + * itself indexed by the high 8 bits of the value. */ for (i = 0; i < num; i++) table[i] = (png_uint_16p)png_malloc(png_ptr, @@ -3892,7 +3894,7 @@ png_build_16to8_table(png_structrp png_ptr, png_uint_16pp *ptable, /* Build a single 8-bit table: same as the 16-bit case but much simpler (and * typically much faster). Note that libpng currently does no sBIT processing - * (apparently contrary to the spec) so a 256 entry table is always generated. + * (apparently contrary to the spec) so a 256-entry table is always generated. */ static void png_build_8bit_table(png_structrp png_ptr, png_bytepp ptable, @@ -4033,7 +4035,7 @@ png_build_gamma_table(png_structrp png_ptr, int bit_depth) * Where 'iv' is the input color value and 'ov' is the output value - * pow(iv, gamma). * - * Thus the gamma table consists of up to 256 256 entry tables. The table + * Thus the gamma table consists of up to 256 256-entry tables. The table * is selected by the (8-gamma_shift) most significant of the low 8 bits of * the color value then indexed by the upper 8 bits: * @@ -4141,7 +4143,7 @@ png_set_option(png_structrp png_ptr, int option, int onoff) * * error: -0.513727 - 0.607759, 308 (0.469978%) of readings inexact * - * In all cases the inexact readings are off by one. + * In all cases the inexact readings are only off by one. */ #ifdef PNG_SIMPLIFIED_READ_SUPPORTED @@ -4181,8 +4183,7 @@ const png_uint_16 png_sRGB_table[256] = 57105,57646,58190,58737,59287,59840,60396,60955, 61517,62082,62650,63221,63795,64372,64952,65535 }; - -#endif /* simplified read only */ +#endif /* PNG_SIMPLIFIED_READ_SUPPORTED */ /* The base/delta tables are required for both read and write (but currently * only the simplified versions.) |