Hi
I have expanded my routine for creating a thumbnail to using a FOR loop to create multiple thumbs. The code is basically the same but I get the error
Warning: Unknown list entry type in request shutdown (36053288) in C:\Websites\internationalautos\dbadmin\create_thumb.php on line 19
Can anyone shed any light on what might be causing it?
NB $file $thumb $picnt $id are being passed from previous script
<?php
include("includes/config.ini");
if ($file != "" && $thumb != "") {
for ($i = 1; $i <= $picnt; $i++) {
$tfile = $id."-".$i.$ext;
$name = "../car_images/pre_images/$tfile";
$tthumb = $id."-".$i.$ext;
$thname = "../car_images/pre_images/thumbnails/$tthumb";
$data = GetImageSize($name,&$info);
switch ($data[2]) {
case 1: copy($name,$thname);
return;
break;
case 2:
$im = @imagecreatefromjpeg($name);
break;
case 3:
$im = @imagecreatefrompng($name);
break;
}
$w=ImageSX($im); // IMAGE WIDTH
$h=ImageSY($im); // IMAGE HEIGHT
$nh = 75;
$nw = 100;
$ni=@imagecreatefrompng("../car_images/thumb.png");
ImageCopyResized($ni,$im,5,5,0,0,$nw,$nh,$w,$h);
ImageJPEG($ni,$thname,25);
}
}
?>