Imagick::shaveImage

(PECL imagick 2.0.0)
Shaves pixels from the image edges
bool Imagick::shaveImage ( int $columns, int $rows )

Shaves pixels from the image edges. It allocates the memory necessary for the new Image structure and returns a pointer to the new image.

Parameters:
columns

Shaves pixels from the image edges. It allocates the memory necessary for the new Image structure and returns a pointer to the new image.

rows

Shaves pixels from the image edges. It allocates the memory necessary for the new Image structure and returns a pointer to the new image.

Returns:

Returns TRUE on success.

Examples:
Imagick::shaveImage()
<?php
function shaveImage($imagePath) {
    $imagick = new \Imagick(realpath($imagePath));
    $imagick->shaveImage(100, 50);
    header("Content-Type: image/jpg");
    echo $imagick->getImageBlob();
}

?>

doc_php
2016-02-24 16:01:26
Comments
Leave a Comment

Please login to continue.