hi fouadovic
I am using imagefromjpeg which i borrowed from a friend of mine which seems to work well… you can see it here https://www.estateagencies.co.za/demo
The img src attribute looks like, displaythumb.php?imagewidth=450&picture=1234.jpg
This is what my displaythumb.php looks like:
————————————–
// usage : <img src=”displaythumb.php?imagewidth=80&photoid=2874.jpg”>
$thumbname = $_GET[photoid];
$directory = “/home/esp007/public_html/demo/photos”;
$widthimage = $_GET[imagewidth];
$filename = $directory . ‘/’ . $thumbname;
$max = $_GET[max];
//$filename = $thumbname;
$new_h = $widthimage;
// Content type
header(‘Content-type: image/jpeg’);
// Get new sizes
$src_img = imagecreatefromjpeg($filename);
$origw=imagesx($src_img);
$origh=imagesy($src_img);
$ratio=$origw*$new_h;
$new_w=$ratio/$origh;
$dst_img = imagecreatetruecolor($new_w,$new_h);
imagecopyresized($dst_img,$src_img,0,0,0,0,$new_w,$new_h,imagesx($src_img),imagesy($src_img));
imagejpeg($dst_img);
——————————–