Update of /cvsroot/php-blog/serendipity/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20324/include
Modified Files:
functions_images.inc.php
Log Message:
Patch from foosel: function does not exist for PHP < 4.3.2. Thanks!
Index: functions_images.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/functions_images.inc.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- functions_images.inc.php 25 Feb 2005 14:36:29 -0000 1.35
+++ functions_images.inc.php 28 Feb 2005 14:17:37 -0000 1.36
@@ -755,8 +755,10 @@
$out = imagecreatetruecolor($newwidth, $newheight);
/* Attempt to copy transparency information, this really only works for PNG */
- imagealphablending($out, false);
- imagesavealpha($out, true);
+ if (function_exists('imagesavealpha')) {
+ imagealphablending($out, false);
+ imagesavealpha($out, true);
+ }
imagecopyresampled($out, $in, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
$func['save']($out, $outfilename, 100);
|