mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Imported from pngcrush-1.4.1.tar
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngrtran.c - transforms the data in a row for PNG readers
|
||||
*
|
||||
* libpng 1.0.6a - March 23, 2000
|
||||
* libpng 1.0.6e - April 9, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||
@@ -622,7 +622,7 @@ png_set_rgb_to_gray_fixed(png_structp png_ptr, int error_action,
|
||||
#endif
|
||||
{
|
||||
png_uint_16 red_int, green_int;
|
||||
if(red > 0 && green > 0)
|
||||
if(red < 0 || green < 0)
|
||||
{
|
||||
red_int = 6968; /* .212671 * 32768 + .5 */
|
||||
green_int = 23434; /* .715160 * 32768 + .5 */
|
||||
|
||||
Reference in New Issue
Block a user