HomeImagickImagickDrawImagickPixelImagick Pixel IteratorImagick KernelDevelopmentTutorial Source codeReport an issue
Category
Example

Imagick::complexImages

← colorThresholdImage   compositeImage →

Example

function complexImages(int $complex_operator)
{
    $imagick = new \Imagick(realpath("images/Biter_500.jpg"));
    $multiply = new Imagick();
    $multiply->newPseudoImage(
        $imagick->getImageWidth(),
        $imagick->getImageHeight(),
        "gradient:black-white"
    );
    $imagick->addImage($multiply);

    $result = $imagick->complexImages($complex_operator);
    $result->setFormat('jpg');
    header("Content-Type: image/jpeg");
    echo $result->getImageBlob();
}