PHP 5.4.36 Released

Imagick::resampleImage

(PECL imagick 2.0.0)

Imagick::resampleImageRééchantillonne l'image

Description

bool Imagick::resampleImage ( float $x_resolution , float $y_resolution , int $filter , float $blur )

Rééchantillonne l'image à la résolution désirée.

Liste de paramètres

x_resolution

y_resolution

filter

blur

Valeurs de retour

Returns TRUE on success.

add a note add a note

User Contributed Notes 2 notes

up
0
bleighty at dvidshub dot net
1 year ago
Please note that blur of 1 should not affect the image if I'm understanding correctly from this page:
http://www.php.net/manual/en/imagick.resizeimage.php
up
0
anagai at yahoo dot com
3 years ago
Lets say you want to reduce the resolution of uploaded images for the web.

The following will load a image at whatever resolution and resample it down to 72 dpi and save as a different file.

The dpi for setImageResolution() and resampleImage() should be whatever dpi your resampling too.

<?php
$image
= new Imagick();
$image->readImage('image.jpg');
$image->setImageResolution(72,72);
$image->resampleImage(72,72,imagick::FILTER_UNDEFINED,0);
$image->writeImage('image72.jpg');
?>
To Top