hallo iedereen...

ik zit met een probleem met het maken van thumbnails....
Bij sommige foto's doet hij alles perfect en bij andere geeft hij gewoon niks weer... iemand een idee hoe dat komt?

hier het scriptje wat aangeroepen wordt:


<?
$bestand = $_GET['bestand']; 
$new_width = 150; //
$new_height = 150; //
global $convert;
global $ImageTool;
$imgsize = GetImageSize($bestand);
$width = $imgsize[0];
$height = $imgsize[1];
if ($width > $height) { // If the width is greater than the height it's a horizontal picture
  	$xoord = ceil(($width - $height) / 2 );
   	$width = $height;      // Then we read a square frame that equals the width
} 
else {
   	$yoord = ceil(($height - $width) / 2);
   	$height = $width;
}
$new_im = ImageCreatetruecolor($new_width,$new_height);
$im = ImageCreateFromJPEG($bestand);
imagecopyresampled($new_im,$im,0,0,$xoord,$yoord,$new_width,
$new_height,$width,$height);
header("Content-type: image/jpeg"); 
imagejpeg($new_im,'',100); 
?>


thanx
Worden de afbeeldingen eerst naar de harde schijf weggeschreven, of lees je gewoon de temp. in?

Reageren