Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1:/tmp/cvs-serv21344
Modified Files:
serendipity_functions.inc.php
Log Message:
If imagegif() does not exist, we use imagepng() to handle *.gif images.
If imagecreatefromX() does not exist, we are bailing out
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- serendipity_functions.inc.php 30 May 2003 15:05:20 -0000 1.57
+++ serendipity_functions.inc.php 4 Jun 2003 22:02:17 -0000 1.58
@@ -1145,9 +1145,15 @@
default:
return false;
}
-
- if (!function_exists($loadfn) && !function_exists($savefn)) {
+
+ /* If our loader does not exist, we are doomed */
+ if ( !function_exists($loadfn) ) {
return false;
+ }
+ /* If the save function does not exist (i.e. read-only GIF), we want to output it as PNG
+ This will at the same time preserve GIF transparency */
+ if ( !function_exists($savefn) ) {
+ $savefn = "imagepng";
}
$in = $loadfn($infilename);
|