[libpng16] Cosmetic revision of previous change

This commit is contained in:
Glenn Randers-Pehrson 2014-03-17 15:35:28 -05:00
parent a518abd582
commit d74d82137b

View File

@ -6776,11 +6776,12 @@ image_transform_png_set_rgb_to_gray_ini(PNG_CONST image_transform *this,
* conversion adds another +/-2 in the 16-bit case and * conversion adds another +/-2 in the 16-bit case and
* +/-(1<<(15-PNG_MAX_GAMMA_8)) in the 8-bit case. * +/-(1<<(15-PNG_MAX_GAMMA_8)) in the 8-bit case.
*/ */
that->pm->limit +=
# if PNG_MAX_GAMMA_8 < 14 # if PNG_MAX_GAMMA_8 < 14
that->pm->limit += pow((that->this.bit_depth == 16 ? 8. : pow((that->this.bit_depth == 16 ? 8. :
6. + (1<<(15-PNG_MAX_GAMMA_8)))/65535, data.gamma); 6. + (1<<(15-PNG_MAX_GAMMA_8)))/65535, data.gamma);
# else # else
that->pm->limit += pow((that->this.bit_depth == 16 ? 8. : pow((that->this.bit_depth == 16 ? 8. :
8. + (1<<(15-PNG_MAX_GAMMA_8)))/65535, data.gamma); 8. + (1<<(15-PNG_MAX_GAMMA_8)))/65535, data.gamma);
# endif # endif
} }
@ -6800,10 +6801,11 @@ image_transform_png_set_rgb_to_gray_ini(PNG_CONST image_transform *this,
* internal calculation errors, not the actual limit imposed by * internal calculation errors, not the actual limit imposed by
* pngvalid on the output errors. * pngvalid on the output errors.
*/ */
that->pm->limit +=
# if DIGITIZE # if DIGITIZE
that->pm->limit += pow(1.1 /255, data.gamma); pow(1.1 /255, data.gamma);
# else # else
that->pm->limit += pow(1.0 /255, data.gamma); pow(1.0 /255, data.gamma);
# endif # endif
} }
} }