CakeFest 2024: The Official CakePHP Conference

Imagick::negateImage

(PECL imagick 2, PECL imagick 3)

Imagick::negateImageGörüntünün renklerini negatiflerine dönüştürür

Açıklama

public Imagick::negateImage(bool $gri_tonlama, int $kanal = Imagick::CHANNEL_DEFAULT): bool

Görüntünün renklerini negatiflerine dönüştürür. gri_tonlama bağımsız değişkenine true atanırsa görüntünün sadece gri tonlama renkleri negatiflerine dönüştürülür.

Bağımsız Değişkenler

gri_tonlama

true atanırsa görüntünün sadece gri tonlu pikselleri negatiflerine dönüştürülür.

kanal

Normalde kanal türü sabitlerinden biri, ancak bitsel işleçler kullanılarak birden fazla kanal belirtilebilir.

Dönen Değerler

Başarı durumunda true döner.

Hatalar/İstisnalar

Hata durumunda bir ImagickException istisnası oluşur.

Örnekler

Örnek 1 Imagick::negateImage()

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

?>

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top