Forum Moderators: coopster
Also you will need a lot of various image functions.
I would advice to check various free scripts/classes to see how they work, and then code some script for yourself (to better suit your needs)
<?php
class resize
{
function resize($width, $height, $target)
{
if ($width > $height)
{
$percentage = ($target / $width);
}
else
{
$percentage = ($target / $height);
}
$width = round($width * $percentage);
$height = round($height * $percentage);
return "width='$width' height='$height'";
}// end function
}// end class
class pic_resize extends resize
{
function pic_resize($img)
{
list($width, $height) = getimagesize($img);
$resize = new resize;
echo '<img src="';
echo $img;
echo '" ';
echo $resize->resize($width, $height, 60);
echo '>';
}// end function
}// end class
?> then add this to the page: <?php
require('class url');
$picture = new pic_resize("image url");
?>