DJ Mike's Tutorials: PHP

ImageMagick Functions

^

Imagick::chopImage

Description:
bool Imagick::chopImage ( int $width , int $height , int $x , int $y )

Removes a region of an image and collapses the image to occupy the removed portion.
Parameters:
width
Width of the chopped area.
height
Height of the chopped area.
x
X origin of the chopped area.
y
Y origin of the chopped area.
Return Values
Returns TRUE on success.
Errors/Exceptions
Throws ImagickException on error.

Example



<?php
header
("Content-type: image/jpeg");
$image = new Imagick("opossum.jpg"); 
$image->chopImage20,2088,62 );
echo 
$image;
?> 


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