Imported from pngcrush-1.4.1.tar

This commit is contained in:
Glenn Randers-Pehrson
2000-04-09 19:33:01 -05:00
parent d346287eaa
commit 1abb7801d4
28 changed files with 504 additions and 194 deletions

View File

@@ -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 */