downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

Imagick::resetImagePage> <Imagick::render
[edit] Last updated: Fri, 17 May 2013

view this page in

Imagick::resampleImage

(PECL imagick 2.0.0)

Imagick::resampleImageResample image to desired resolution

Beschreibung

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

Resample image to desired resolution.

Parameter-Liste

x_resolution

y_resolution

filter

blur

Rückgabewerte

Liefert TRUE bei Erfolg.



add a note add a note User Contributed Notes Imagick::resampleImage - [1 notes]
up
0
anagai at yahoo dot com
1 year 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');
?>

 
show source | credits | sitemap | contact | advertising | mirror sites