Forum Moderators: coopster
GD Support enabled
GD Version bundled (2.0.28 compatible)
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
[edited by: coopster at 2:56 pm (utc) on Jan. 14, 2005]
[edit reason] removed url [/edit]
// THUMB MAKEN
$name = "imagesb/".$bestandsnaam;
$filename = "imagesb/thumbs/".$bestandsnaam;
$thumb_w = "110px";
$thumb_h = "77px";
if (preg_match("/jpg¦jpeg/",$extl)){
$src_img=imagecreatefromjpeg($name);
}
if (preg_match("/png/",$extl)){
$src_img=imagecreatefrompng($name);
}
$old_x=imageSX($src_img);
$old_y=imageSY($src_img);
$dst_img=ImageCreateTrueColor($thumb_w,$thumb_h);
imagecopyresampled($dst_img,$src_img,0,0,0,0,$thumb_w,$thumb_h,$old_x,$old_y);
if (preg_match("/png/",$extl)){
imagepng($dst_img,$filename);
} else {
imagejpeg($dst_img,$filename);
}
imagedestroy($dst_img);
imagedestroy($src_img);
// eind Thumb Maken
A great thread with many tricks
The one you are looking for is within page 2
Regards
Henry