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

search for in the

Imagick::current> <Imagick::convolveImage
Last updated: Sun, 25 Nov 2007

view this page in

Imagick::cropImage

(No version information available, might be only in CVS)

Imagick::cropImage — Extracts a region of the image

설명

bool Imagick::cropImage ( int $width , int $height , int $x , int $y )
Warning

This function is currently not documented; only the argument list is available.

Warning

This function is EXPERIMENTAL. The behaviour of this function, the name of this function, and anything else documented about this function may change without notice in a future release of PHP. Use this function at your own risk.

Extracts a region of the image.

매개변수

width

height

x

y

반환값

성공시에 TRUE를 반환합니다.



add a note add a note User Contributed Notes
Imagick::cropImage
vincent dot hoen at gmail dot com
02-Aug-2007 06:35
There is an easiest way to crop an image : 

$picture = new Imagick('animated_gif.gif');

foreach($picture as $frame){
    $frame->cropImage($width, $height, $x, $y);
}
vincent dot hoen at gmail dot com
01-Aug-2007 08:39
If you're working with animated gif you might want to process this way (Probably not the best, but at least it works) :

$picture = new Imagick('animated_gif.gif');

//Crop first image
$picture->cropImage($width, $height, $x, $y);

//Crop every other image
while($picture->hasNextImage()){
    $this->nextImage();
    $this->cropImage($width, $height, $x, $y);
}

//display image
$picture->getImageBlob();

Imagick::current> <Imagick::convolveImage
Last updated: Sun, 25 Nov 2007
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites