提交 7a59e1ea 编写于 作者: G Glenn Randers-Pehrson

[devel] 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).
上级 3da965ce
...@@ -730,6 +730,9 @@ version 1.4.0beta107 [December 4, 2009] ...@@ -730,6 +730,9 @@ version 1.4.0beta107 [December 4, 2009]
version 1.4.0beta108 [December 11, 2009] version 1.4.0beta108 [December 11, 2009]
Removed leftover "-DPNG_CONFIGURE_LIBPNG" from contrib/pngminim/*/makefile Removed leftover "-DPNG_CONFIGURE_LIBPNG" from contrib/pngminim/*/makefile
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 Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit
......
...@@ -2417,6 +2417,9 @@ version 1.4.0beta107 [December 4, 2009] ...@@ -2417,6 +2417,9 @@ version 1.4.0beta107 [December 4, 2009]
version 1.4.0beta108 [December 11, 2009] version 1.4.0beta108 [December 11, 2009]
Removed leftover "-DPNG_CONFIGURE_LIBPNG" from contrib/pngminim/*/makefile Removed leftover "-DPNG_CONFIGURE_LIBPNG" from contrib/pngminim/*/makefile
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 Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit
......
/* pngrtran.c - transforms the data in a row for PNG readers /* 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 * Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
...@@ -1410,11 +1410,6 @@ png_do_read_transformations(png_structp png_ptr) ...@@ -1410,11 +1410,6 @@ png_do_read_transformations(png_structp png_ptr)
png_do_gray_to_rgb(&(png_ptr->row_info), png_ptr->row_buf + 1); png_do_gray_to_rgb(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif #endif
#ifdef PNG_READ_16_TO_8_SUPPORTED
if (png_ptr->transformations & PNG_16_TO_8)
png_do_chop(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
#ifdef PNG_READ_BACKGROUND_SUPPORTED #ifdef PNG_READ_BACKGROUND_SUPPORTED
if ((png_ptr->transformations & PNG_BACKGROUND) && if ((png_ptr->transformations & PNG_BACKGROUND) &&
((png_ptr->num_trans != 0 ) || ((png_ptr->num_trans != 0 ) ||
...@@ -1444,6 +1439,11 @@ png_do_read_transformations(png_structp png_ptr) ...@@ -1444,6 +1439,11 @@ png_do_read_transformations(png_structp png_ptr)
png_ptr->gamma_shift); png_ptr->gamma_shift);
#endif #endif
#ifdef PNG_READ_16_TO_8_SUPPORTED
if (png_ptr->transformations & PNG_16_TO_8)
png_do_chop(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
#ifdef PNG_READ_DITHER_SUPPORTED #ifdef PNG_READ_DITHER_SUPPORTED
if (png_ptr->transformations & PNG_DITHER) if (png_ptr->transformations & PNG_DITHER)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册