DJ Mike's Tutorials: PHP

Imagick Functions

^

Imagick::sampleImage

Description:
bool Imagick::sampleImage ( int $columns , int $rows )

Scales an image to the desired dimensions with pixel sampling. Unlike other scaling methods, this method does not introduce any additional color into the scaled image.
Parameters:
columns
Width of the image.
rows
Height of the image
Return Values
Returns TRUE on success.

Example


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