PHP : Function Reference : Imagick Image Library : Imagick::resizeImage
curiosity1
I believe the function parameters are listed in the wrong order.
I think they should be width followed by height; not height then width:
bool Imagick::resizeImage ( float $width, float $height, int $filter, float $blur )
andrabr
blur: > 1 is blurry, < 1 is sharp
To create a nice thumbnail (LANCZOS is the slowest filter):
<?php
$thumb = new Imagick();
$thumb->readImage('myimage.gif'); $thumb->resizeImage(320,240,Imagick::FILTER_LANCZOS,1);
$thumb->writeImage('mythumb.gif');
$thumb->clear();
$thumb->destroy();
?>
Or, a shorter version of the same:
<?php
$thumb = new Imagick('myimage.gif');
$thumb->resizeImage(320,240,Imagick::FILTER_LANCZOS,1);
$thumb->writeImage('mythumb.gif');
$thumb->destroy();
?>
|