Imagick::setImagePage

(PECL imagick 2.0.0)

Imagick::setImagePageSets the page geometry of the image

설명

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

Sets the page geometry of the image.

인수

width

height

x

y

반환값

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

오류/예외

오류시에 ImagickException이 발생합니다.

add a note add a note

User Contributed Notes 1 note

up
2
Darren Burnhill
14 years ago
This would appear to be the equivalent of +repage in ImageMagick.

<?php
  $ImagickObj
= new Imagick($sourceImagePath);
 
$ImagickObj->cropImage($_POST['w'], $_POST['h'], $_POST['x'], $_POST['y']);
 
$ImagickObj->setImagePage($_POST['w'], $_POST['h'], 0, 0);
 
$ImagickObj->writeImage($cropFilePath);
?>
To Top