HEX
Server: LiteSpeed
System: Linux standart9.isimtescil.net 3.10.0-962.3.2.lve1.5.26.7.el7.x86_64 #1 SMP Wed Oct 2 07:53:12 EDT 2019 x86_64
User: karalev (5310)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //opt/cpanel/ea-php74/root/usr/share/tests/pecl/imagick/tests/311_Imagick_channelFxImage.phpt
--TEST--
Test Imagick, channelFxImage
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('Imagick', array('channelFxImage'));
?>
--FILE--
<?php

// MagickChannelFxImage() applies a channel expression to the specified image.
// The expression consists of one or more channels, either mnemonic or numeric
// (e.g. red, 1), separated by actions as follows:
//
//   <=>     exchange two channels (e.g. red<=>blue)
//   =>      transfer a channel to another (e.g. red=>green)
//   ,       separate channel operations (e.g. red, green)
//   |       read channels from next input image (e.g. red | green)
//   ;       write channels to next output image (e.g. red; green; blue)

function whiteBalanceImage() {
    $imagick = new \Imagick(__DIR__ . '/Biter_500.jpg');
    $result = $imagick->channelFxImage("red<=>blue");
    //    $result->writeImage(__DIR__ . '/complexImages_output_image.png');

    $result->getImageBlob();
}

whiteBalanceImage() ;
echo "Ok";
?>
--EXPECTF--
Ok