Resize an image to a standard size for the web. This method works best
when resizing to a size only slightly smaller than the previous image
size.
<?php
header('Content-type: image/jpeg');
$image = new Imagick('image.jpg');
$image->adaptiveResizeImage(1024,768);
echo $image;
?>