yes, you have to use the gd library: http://us3.php.net/manual/en/ref.image.php
Cited From: http://us3.php.net/manual/en/functio...opyresized.php
PHP Code:
<?php
// File and new size
$filename = 'test.jpg';
$percent = 0.5;
// Content type
header('Content-type: image/jpeg'); // ADDED BY ME: only if you don't want to save it for dynamic image creation only.(use: <img src="resizeimg.php?img=test.jpg" />)
// Get new sizes
list($width, $height) = getimagesize($filename);
$newwidth = $width * $percent;
$newheight = $height * $percent;
// Load
$thumb = imagecreatetruecolor($newwidth, $newheight);
$source = imagecreatefromjpeg($filename);
// Resize
imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
// Output
imagejpeg($thumb); // ADDED BY ME: for dynamic images, to save use imagejpeg($thumb, "folder/location/", 100);
?>