--- includes/image.inc	2005-12-14 14:06:41.000000000 -0600
+++ includes/image.inc	2006-05-23 14:42:50.000000000 -0500
@@ -222,7 +222,9 @@ function image_gd_resize($source, $desti
     return false;
   }
 
-  $res = imageCreateTrueColor($width, $height);
+  //New line to use new function
+  //$res = imageCreateTrueColor($width, $height);
+  $res = imagecreatetruecolortransparent($width, $height);
   imageCopyResampled($res, $im, 0, 0, 0, 0, $width, $height, $info['width'], $info['height']);
   $result = image_gd_close($res, $destination, $info['extension']);
 
@@ -232,6 +234,26 @@ function image_gd_resize($source, $desti
   return $result;
 }
 
+function imagecreatetruecolortransparent($x,$y) {
+  $i = imagecreatetruecolor($x,$y);
+  $b = imagecreatefromstring(base64_decode(blankpng()));
+  imagealphablending($i,false);
+  imagesavealpha($i,true);
+  imagecopyresized($i,$b,0,0,0,0,$x,$y,imagesx($b),imagesy($b));
+  return $i;
+}
+
+function blankpng() {
+  $c  = "iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29m";
+  $c .= "dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAADqSURBVHjaYvz//z/DYAYAAcTEMMgBQAANegcCBNCg";
+  $c .= "dyBAAA16BwIE0KB3IEAADXoHAgTQoHcgQAANegcCBNCgdyBAAA16BwIE0KB3IEAADXoHAgTQoHcgQAAN";
+  $c .= "egcCBNCgdyBAAA16BwIE0KB3IEAADXoHAgTQoHcgQAANegcCBNCgdyBAAA16BwIE0KB3IEAADXoHAgTQ";
+  $c .= "oHcgQAANegcCBNCgdyBAAA16BwIE0KB3IEAADXoHAgTQoHcgQAANegcCBNCgdyBAAA16BwIE0KB3IEAA";
+  $c .= "DXoHAgTQoHcgQAANegcCBNCgdyBAgAEAMpcDTTQWJVEAAAAASUVORK5CYII=";
+
+  return $c;
+}
+
 /**
  * Rotate an image the given number of degrees.
  */
