array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'uk', ), 'this' => array ( 0 => 'imagick.fximage.php', 1 => 'Imagick::fxImage', 2 => 'Evaluate expression for each pixel in the image', ), 'up' => array ( 0 => 'class.imagick.php', 1 => 'Imagick', ), 'prev' => array ( 0 => 'imagick.functionimage.php', 1 => 'Imagick::functionImage', ), 'next' => array ( 0 => 'imagick.gammaimage.php', 1 => 'Imagick::gammaImage', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/imagick/imagick/fximage.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

Imagick::fxImage

(PECL imagick 2, PECL imagick 3)

Imagick::fxImageEvaluate expression for each pixel in the image

Опис

public Imagick::fxImage(string $expression, int $channel = Imagick::CHANNEL_DEFAULT): Imagick

Evaluate expression for each pixel in the image. Consult » The Fx Special Effects Image Operator for more information.

Параметри

expression

The expression.

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channeltype constants using bitwise operators. Refer to this list of channel constants.

Значення, що повертаються

Повертає true в разі успіху.

Помилки/виключення

Кидає ImagickException в разі помилки.

Приклади

Приклад #1 Imagick::fxImage()

<?php
function fxImage() {
$imagick = new \Imagick();
$imagick->newPseudoImage(200, 200, "xc:white");

$fx = 'xx=i-w/2; yy=j-h/2; rr=hypot(xx,yy); (.5-rr/140)*1.2+.5';
$fxImage = $imagick->fxImage($fx);

header("Content-Type: image/png");
$fxImage->setimageformat('png');
echo
$fxImage->getImageBlob();
}

?>