PHP 8.5.0 RC 2 available for testing

Imagick::setImagePage

(PECL imagick 2, PECL imagick 3)

Imagick::setImagePage β€” Sets the page geometry of the image

Опис

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

Sets the page geometry of the image.

ΠŸΠ°Ρ€Π°ΠΌΠ΅Ρ‚Ρ€ΠΈ

width

height

x

y

ЗначСння, Ρ‰ΠΎ ΠΏΠΎΠ²Π΅Ρ€Ρ‚Π°ΡŽΡ‚ΡŒΡΡ

ΠŸΠΎΠ²Π΅Ρ€Ρ‚Π°Ρ” true Π² Ρ€Π°Π·Ρ– успіху.

Помилки/Π²ΠΈΠΊΠ»ΡŽΡ‡Π΅Π½Π½Ρ

ΠšΠΈΠ΄Π°Ρ” ImagickException Π² Ρ€Π°Π·Ρ– ΠΏΠΎΠΌΠΈΠ»ΠΊΠΈ.

οΌ‹add a note

User Contributed Notes 1 note

up
2
Darren Burnhill ΒΆ
16 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