iliaa           Thu Dec 19 22:44:42 2002 EDT

  Modified files:              (Branch: PHP_4_3)
    /php4/ext/gd/libgd  gd.c 
  Log:
  MFH
  
  
Index: php4/ext/gd/libgd/gd.c
diff -u php4/ext/gd/libgd/gd.c:1.24 php4/ext/gd/libgd/gd.c:1.24.2.1
--- php4/ext/gd/libgd/gd.c:1.24 Tue Nov 12 08:12:58 2002
+++ php4/ext/gd/libgd/gd.c      Thu Dec 19 22:44:41 2002
@@ -566,21 +566,19 @@
   im->open[color] = 1;
 }
 
-void
-gdImageColorTransparent (gdImagePtr im, int color)
+void gdImageColorTransparent (gdImagePtr im, int color)
 {
-  if (!im->trueColor)
-    {
-      if (im->transparent != -1)
-       {
-         im->alpha[im->transparent] = gdAlphaOpaque;
+       if (!im->trueColor) {
+               if (im->transparent != -1) {
+                       im->alpha[im->transparent] = gdAlphaOpaque;
+               }
+               if (color > -1 && color <= gdMaxColors) {
+                       im->alpha[color] = gdAlphaTransparent;
+               } else {
+                       return;
+               }
        }
-      if (color != -1)
-       {
-         im->alpha[color] = gdAlphaTransparent;
-       }
-    }
-  im->transparent = color;
+       im->transparent = color;
 }
 
 void



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to