weiter...wird vom Newsticker ben�igt !! function LoadPic($imgname,&$dest) { $dest="??"; $im = ImageCreateFromJPEG ($imgname); /* Attempt to open */ if (!$im) { /* See if it failed */ $im = @ImageCreateFromGIF ($imgname); /* Attempt to open */ if (!$im) { $im = @ImageCreateFromPNG ($imgname); /* Attempt to open */ if (!$im) { return; } else $dest="png"; } else $dest="gif"; } else $dest="jpg"; return $im; } function thumbnail($img,$w,$h) { $width=imagesx($img); $height=imagesy($img); if (($w>0)||($h>0)) { if ($w==0) { $w=($h/$height)*$width; } else { $h=($w/$width)*$height; } $new=ImageCreateTrueColor($w,$h); imagecopyresized($new,$img, 0, 0, 0, 0, $w, $h, $width, $height ); imagedestroy($img); } return $new; } //======================================== $dest=""; $img = LoadPic("../".$_GET['src'],$dest); $w=$_GET['w']; $qual=99; if ($img) { if (($w>0)||($h>0)) $img=thumbnail($img,$w,$h); header ("Content-type: image/$dest"); Header("Content-Disposition: filename=".basename($src)); Header("Pragma: no-cache"); Header("Expires: 0"); if ($dest=="jpg") ImageJPEG($img,"",$qual); if ($dest=="png") ImagePNG($img); if ($dest=="gif") ImageGIF($img); ImageDestroy($img); } ?>