PHP 8.1.28 Released!

Imagick::getImageRegion

(PECL imagick 2, PECL imagick 3)

Imagick::getImageRegionGörüntünün bir bölgesini çıkarır

Açıklama

public Imagick::getImageRegion(
    int $genişlik,
    int $yükseklik,
    int $x,
    int $y
): Imagick

Görüntünün belirtilen bölgesini yeni bir nesne olarak döndürür.

Bağımsız Değişkenler

width

Bölgenin genişliği.

height

Bölgenin yüksekliği.

x

Bölgenin sol üst köşesinin X konumu.

y

Bölgenin sol üst köşesinin Y konumu.

Dönen Değerler

Görüntünün belirtilen bölgesini yeni bir nesne olarak döndürür.

Hatalar/İstisnalar

Hata durumunda bir ImagickException istisnası oluşur.

add a note

User Contributed Notes 1 note

up
6
zolcos at hotmail dot com
14 years ago
getImageRegion has the same side effect that was mentioned for operations that change the crop of the image -- the new image preserves the old canvas and positioning info. For example, using annotateImage on the new image will interpret the positioning arguments relative to the old image. To correct it, reset this info with setImagePage.

<?php
$im
->setImagePage(0, 0, 0, 0);
?>
To Top