Skip to content

Commit

Permalink
[libpng16] Revert recent changes to pngset.c
Browse files Browse the repository at this point in the history
  • Loading branch information
Glenn Randers-Pehrson committed Oct 17, 2017
1 parent adefba1 commit 3b5bcea
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pngset.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

/* pngset.c - storage of image information into info struct
*
* Last changed in libpng 1.6.32 [August 24, 2017]
* Last changed in libpng 1.6.35 [(PENDING RELEASE)]
* Copyright (c) 1998-2017 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.)
Expand Down Expand Up @@ -1035,17 +1035,13 @@ png_set_tRNS(png_structrp png_ptr, png_inforp info_ptr,
(trans_color->red > sample_max ||
trans_color->green > sample_max ||
trans_color->blue > sample_max)))
{
png_warning(png_ptr,
"tRNS chunk has out-of-range samples for bit_depth");
png_free_data(png_ptr, info_ptr, PNG_FREE_TRNS, 0);
return;
}
}

info_ptr->trans_color = *trans_color;

if (num_trans == 0 && trans_color != NULL)
if (num_trans == 0)
num_trans = 1;
}

Expand Down

0 comments on commit 3b5bcea

Please sign in to comment.