summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ANNOUNCE4
-rw-r--r--CHANGES2
-rw-r--r--pngpriv.h2
-rw-r--r--pngrtran.c18
4 files changed, 8 insertions, 18 deletions
diff --git a/ANNOUNCE b/ANNOUNCE
index b3e9effb0..4013bc302 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,5 +1,5 @@
-Libpng 1.5.4beta03 - June 14, 2011
+Libpng 1.5.4beta03 - June 15, 2011
This is not intended to be a public release. It will be replaced
within a few weeks by a public version or by another test version.
@@ -210,6 +210,8 @@ Version 1.5.4beta03 [June 15, 2011]
form if tRNS was present but alpha was marked to be stripped; this exposed
a check for tRNS in png_do_expand_palette() which is inconsistent with the
code elsewhere in libpng.
+ Correction to the expand_16 code; removed extra instance of
+ png_set_scale_16_to_8 from pngpriv.h
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
(subscription required; visit
diff --git a/CHANGES b/CHANGES
index 240f76278..9e0e6d44b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3473,6 +3473,8 @@ Version 1.5.4beta03 [June 15, 2011]
form if tRNS was present but alpha was marked to be stripped; this exposed
a check for tRNS in png_do_expand_palette() which is inconsistent with the
code elsewhere in libpng.
+ Correction to the expand_16 code; removed extra instance of
+ png_set_scale_16_to_8 from pngpriv.h
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
diff --git a/pngpriv.h b/pngpriv.h
index 92428b8d8..549982bd3 100644
--- a/pngpriv.h
+++ b/pngpriv.h
@@ -827,8 +827,6 @@ PNG_EXTERN void png_do_scale_16_to_8 PNGARG((png_row_infop row_info,
PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info,
png_bytep row));
#endif
-PNG_EXTERN void png_do_scale_16_to_8 PNGARG((png_row_infop row_info,
- png_bytep row));
#endif
#ifdef PNG_READ_QUANTIZE_SUPPORTED
diff --git a/pngrtran.c b/pngrtran.c
index ada35a913..17f4ec1eb 100644
--- a/pngrtran.c
+++ b/pngrtran.c
@@ -1456,28 +1456,16 @@ png_init_read_transformations(png_structp png_ptr)
*
* The PNG_BACKGROUND_EXPAND code above does not expand to 16 bits at
* present, so that case is ok (until do_expand_16 is moved.)
+ *
+ * NOTE: this discards the low 16 bits of the user supplied background
+ * color, but until expand_16 works properly there is no choice!
*/
-
- if (png_ptr->transformations & PNG_16_TO_8)
- {
# define CHOP(x) (x)=((png_uint_16)(((png_uint_32)(x)*255+32895) >> 16))
CHOP(png_ptr->background.red);
CHOP(png_ptr->background.green);
CHOP(png_ptr->background.blue);
CHOP(png_ptr->background.gray);
# undef CHOP
- }
-#ifdef PNG_READ_CHOP_16_TO_8_SUPPORTED
- else /* Use pre-libpng-1.5.4 inaccurate "ACCURATE" scaling */
- {
-# define CHOP(x) (x)=((png_uint_16)((2*(png_uint_32)(x) + 257)/514))
- CHOP(png_ptr->background.red);
- CHOP(png_ptr->background.green);
- CHOP(png_ptr->background.blue);
- CHOP(png_ptr->background.gray);
-# undef CHOP
- }
-#endif /* PNG_READ_CHOP_16_TO_8_SUPPORTED */
}
#endif /* PNG_READ_BACKGROUND_SUPPORTED && PNG_READ_EXPAND_16_SUPPORTED */