Fix failed MNGs imagesize detection (existing basename-matching GIF expected)
[www.energie.vellum.cz.git] / common.php
index 3691b89..7644141 100644 (file)
@@ -182,7 +182,7 @@ function img_size($width,$height)
 
 function img($file,$alt,$attrs="")
 {
-       list($width,$height)=getimagesize($file);
+       list($width,$height)=getimagesize(ereg_replace("\\.mng",".gif",$file));
        $alt=htmlspecialchars($alt);
        return("<img src=\"$file\" alt=\"$alt\" title=\"$alt\" ".img_size($width,$height)
                        .($attrs=="" ? "" : " ".$attrs)." />");