Slide 5
Slide 5 text
Resize Example: GD
$height) {
$finalHeight = $height;
$finalWidth = ($finalHeight * imagesx($image)) / imagesy($image);
}
$newimage = imagecreatetruecolor($finalWidth, $finalHeight);
imagecopyresampled($newimage, $image, 0, 0, 0, 0, $finalWidth,
$finalHeight, imagesx($image), imagesy($image));
echo imagejpeg($newimage);