DJ Mike's Tutorials: PHP

Imagemagick Functions


^

Imagick::adaptiveResizeImage

Description:
bool Imagick::adaptiveResizeImage ( int $width , int $height [, bool $fit ] )

Adaptively resize image with data-dependent triangulation. Avoids blurring across sharp color changes. Most useful when used to shrink images slightly to a slightly smaller "web size"; may not look good when a full-sized image is adaptively resized to a thumbnail.
Parameters
width
Width of scaled image
height
Height of scaled image
fit
Optional fit parameter. If absent or FALSE, pass zero as either width or height for proportional scaling.
Return Values
Returns TRUE on success.
Errors/Exceptions
Throws ImagickException on error.

Example


<?php 
$image 
= new Imagick("opossum.jpg"); 

$resize .7;
$w $image->getImageWidth();

$image->adaptiveResizeImage$resize*$w0FALSE ); 

header"Content-Type: image/jpeg" );
echo 
$image;
?>  



^

Created by DJ Mike from Santa Barbara

DJ Mike


Dance Away Santa Barbara's Home Page
<a href="http://www.statcounter.com/" target="_blank"> <img src="http://c5.statcounter.com/counter.php?sc_project=1321035&java=0&security=da2193dc" alt="counter free hit invisible" border="0" /></a>