i'm using shiegege's resize tool (link). it works great on pc browsers. but doesn't work at all on a mac browser (all i get is a 16x16 "broken image"). i've revised some of the code, pasted below:
<?php
CONFIG
$picture_location="../images/dailies/" . $image_name; // picture location
$thumb_name = substr($image_name, 0, -4) . "_t.jpg";
$picture_save="../images/dailies/" . $thumb_name; // picture save location
$size=100; // thumbnail size (pixels)
/CONFIG
$img_des=resize_img($picture_location,$size);
imagejpeg($img_des,$picture_save);
function resize_img($imgname,$size)
{
Header("Content-Type: image/jpeg");
$img_src = ImageCreateFromjpeg ($imgname);
$true_width = imagesx($img_src);
$true_height = imagesy($img_src);
if ($true_width>=$true_height)
{
$width=$size;
$height = ($width/$true_width)$true_height;
}
else
{
$height=$size;
$width = ($height/$true_height)$true_width;
}
$img_des = ImageCreateTrueColor($width,$height);
imagecopyresized ($img_des, $img_src, 0, 0, 0, 0, $width, $height, $true_width, $true_height);
return $img_des;
}
?>
(html code follows, but it seems to choke on the above).
any help would be much appreciated.
thanks.