DJ Mike's Tutorials: PHP

Imagick Functions

^

Imagick::scaleImage

Description:
bool Imagick::scaleImage ( int $cols , int $rows [, bool $fit ] )

Scales an image to the desired dimensions.
Parameters:
cols
Width of the image.
rows
Height of the image
fit
Optional fit parameter, defaults to false. If FALSE, pass zero as either columns of rows for proportional scaling. Use TRUE for nonproportional resizing.
Return Values
Returns TRUE on success.
Errors/Exceptions
Throws ImagickException on error.

Examples


<?php
header
('Content-type: image/jpeg'); 
$image = new Imagick("opossum.jpg"); 
$image->scaleimage(20050FALSE ); 
echo 
$image
?> 


<?php
header
('Content-type: image/jpeg'); 
$image = new Imagick("opossum.jpg"); 
$image->scaleimage(0300,  FALSE ); 
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>