This patch corrects a bug in libpng 0.95b (and probably all earlier
versions) wherein automatic conversion to RGBA of a palette image
with 256 transparency entries results in a completely opaque image
(i.e., all alpha values = 255 = 0xff).

GRR 970412


*** pngrtran.c.old	Sat Apr  5 11:57:33 1997
--- pngrtran.c	Fri Apr 11 17:49:33 1997
***************
*** 2604,2610 ****
 
                 for (i = 0; i < row_info->width; i++)
                 {
!                   if (*sp >= (png_byte)num_trans)
                       *dp-- = 0xff;
                    else
                       *dp-- = trans[*sp];
--- 2607,2614 ----
  
                 for (i = 0; i < row_info->width; i++)
                 {
!                   /* GRR 970411:  num_trans can be 256: don't truncate */
!                   if ((int)(*sp) >= num_trans)
                       *dp-- = 0xff;
                    else
                       *dp-- = trans[*sp];
