
Pixel interpolation methods in ImageMagick (2004) - networked
http://www.imagemagick.org/Usage/misc/#interpolate
======
Theodores
Does anyone know how to use this when resizing images with PHP's 'imagick'
library? Currently I use:

    
    
        $im->resizeImage($box_x, $box_y, Imagick::FILTER_LANCZOS, 1, 1);
    
    

or...

    
    
        $im->resizeImage($box_x, $box_y, Imagick::FILTER_CATROM, 1, 1);
    

On the man page there is no obvious way to use the imagick::INTERPOLATE_SPLINE
constant when resizing images:

[http://php.net/manual/en/imagick.resizeimage.php](http://php.net/manual/en/imagick.resizeimage.php)

It is a shame that such small tweaks is always a non-existent man-page away
with PHP's ImageMagick wrapper. (Using spline could smooth out a lot of
straight and thin edges, but, as it is, I will never find out.)

~~~
tveita
For resizing operation you use a resampling filter, not an interpolation
method. E.g. the 'point' filter corresponds to the 'nearest' interpolation.
[http://www.imagemagick.org/Usage/filter/](http://www.imagemagick.org/Usage/filter/)

To set interpolation for e.g. rotation operations, you'd use the
setImageInterpolateMethod method:

[http://php.net/manual/en/imagick.setimageinterpolatemethod.p...](http://php.net/manual/en/imagick.setimageinterpolatemethod.php)

------
to3m
probably best to combine with handling the image gamma:
[http://archive.is/3gmxe](http://archive.is/3gmxe)

I'm less sure of how much of a difference this will make for other
transformations but it's very important for scaling.

