mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[alpha] Relocated png_do_chop() to its original position in pngrtran.c
The change in version 1.2.41beta08 caused transparency to be handled wrong in some 16-bit datastreams (Yusaku Sugai).
This commit is contained in:
3
ANNOUNCE
3
ANNOUNCE
@@ -51,6 +51,9 @@ version 1.4.1alpha02 [December 11, 2009]
|
||||
instead of in $prefix/include/libpng. Also revised makefile.sco
|
||||
to put them in $prefix/include/libpng14 instead of in
|
||||
$prefix/include/libpng/libpng14.
|
||||
Relocated png_do_chop() to its original position in pngrtran.c; the
|
||||
change in version 1.2.41beta08 caused transparency to be handled wrong
|
||||
in some 16-bit datastreams (Yusaku Sugai).
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
||||
3
CHANGES
3
CHANGES
@@ -2433,6 +2433,9 @@ version 1.4.1alpha02 [December 11, 2009]
|
||||
instead of in $prefix/include/libpng. Also revised makefile.sco
|
||||
to put them in $prefix/include/libpng14 instead of in
|
||||
$prefix/include/libpng/libpng14.
|
||||
Relocated png_do_chop() to its original position in pngrtran.c; the
|
||||
change in version 1.2.41beta08 caused transparency to be handled wrong
|
||||
in some 16-bit datastreams (Yusaku Sugai).
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
||||
16
pngrtran.c
16
pngrtran.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngrtran.c - transforms the data in a row for PNG readers
|
||||
*
|
||||
* Last changed in libpng 1.4.0 [December 4, 2009]
|
||||
* Last changed in libpng 1.4.0 [December 11, 2009]
|
||||
* Copyright (c) 1998-2009 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.)
|
||||
@@ -1475,6 +1475,20 @@ png_do_read_transformations(png_structp png_ptr)
|
||||
png_ptr->gamma_shift);
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_16_TO_8_SUPPORTED
|
||||
# ifdef PNG_READ_PREMULTIPLY_ALPHA_SUPPORTED
|
||||
/* Do this after the PREMULTIPLY operation */
|
||||
if (!(png_ptr->transformations & PNG_PREMULTIPLY_ALPHA))
|
||||
{
|
||||
if (png_ptr->transformations & PNG_16_TO_8)
|
||||
png_do_chop(&(png_ptr->row_info), png_ptr->row_buf + 1);
|
||||
}
|
||||
# else
|
||||
if (png_ptr->transformations & PNG_16_TO_8)
|
||||
png_do_chop(&(png_ptr->row_info), png_ptr->row_buf + 1);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_DITHER_SUPPORTED
|
||||
if (png_ptr->transformations & PNG_DITHER)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user