diff --git a/ANNOUNCE b/ANNOUNCE index df504ed7b..1b7afa2d9 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -383,6 +383,7 @@ Version 1.5.0beta45 [August 24, 2010] what it calls an "authoring error". The change to make pnglibconf.h simply copies the file; in the future it may actually generate the file from scripts/pnglibconf.dfa as the other build systems do. + Changed pngvalid to work when floating point APIs are disabled Send comments/corrections/commendations to png-mng-implement at lists.sf.net: (subscription required; visit diff --git a/CHANGES b/CHANGES index 965e1d5a3..a5667dc0f 100644 --- a/CHANGES +++ b/CHANGES @@ -3020,6 +3020,7 @@ Version 1.5.0beta45 [August 24, 2010] what it calls an "authoring error". The change to make pnglibconf.h simply copies the file; in the future it may actually generate the file from scripts/pnglibconf.dfa as the other build systems do. + Changed pngvalid to work when floating point APIs are disabled Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/pngvalid.c b/pngvalid.c index 92a158bc2..85993a18b 100644 --- a/pngvalid.c +++ b/pngvalid.c @@ -3078,7 +3078,15 @@ gamma_test(png_modifier *pmIn, PNG_CONST png_byte colour_typeIn, pp = set_modifier_for_read(d.pm, &pi, d.this.id, name); /* Set up gamma processing. */ +#ifdef PNG_FLOATING_POINT_SUPPORTED png_set_gamma(pp, d.screen_gamma, d.file_gamma); +#else + { + png_fixed_point s = floor(d.screen_gamma*100000+.5); + png_fixed_point f = floor(d.file_gamma*100000+.5); + png_set_gamma_fixed(pp, s, f); + } +#endif /* Introduce the correct read function. */ if (d.pm->this.progressive)