Message Boards
Message Boards
Interact
Interact
wiganworld (Feedback, help, your ideas for new content.)
Started by: brian (838)
$srcImg = imagecreatefromjpeg ("$imageDirectory/$imageName");
$origWidth = imagesx($srcImg);
$origHeight = imagesy($srcImg);
$ratio = $origWidth / $thumbWidth;
$thumbHeight = $origHeight * ($thumbWidth / $origWidth);
$thumbImg = imagecreatetruecolor($thumbWidth, $thumbHeight);
imagecopyresampled($thumbImg, $srcImg, 0, 0, 0, 0, $thumbWidth, $thumbHeight, $origWidth, $origHeight);
imagejpeg($thumbImg, "$thumbDirectory/$imageName");
break;
Replied: 31st Aug 2006 at 20:06