PHP 8.3.4 Released!

Imagick::setImagePage

(PECL imagick 2, PECL imagick 3)

Imagick::setImagePage画像のページのジオメトリを設定する

説明

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

画像のページのジオメトリを設定します。

パラメータ

width

height

x

y

戻り値

成功した場合に true を返します。

エラー / 例外

エラー時に ImagickException をスローします。

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