Current Path : /usr/opt/php72/share/pear/test/imagick/tests/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //usr/opt/php72/share/pear/test/imagick/tests/121_Imagick_setImageBias_basic.phpt |
--TEST-- Test Imagick, setImageBias --SKIPIF-- <?php require_once(dirname(__FILE__) . '/skipif.inc'); checkClassMethods('Imagick', array('setImageBias')); ?> --FILE-- <?php $bias = 0.5; //requires ImageMagick version 6.9.0-1 to have an effect on convolveImage function setImageBias($bias) { $imagick = new \Imagick(); $imagick->newPseudoImage(640, 480, "magick:logo"); $xKernel = array( -0.70, 0, 0.70, -0.70, 0, 0.70, -0.70, 0, 0.70 ); $imagick->setImageBias($bias * \Imagick::getQuantum()); $imagick->convolveImage($xKernel, \Imagick::CHANNEL_ALL); $imagick->setImageFormat('png'); header('Content-type: image/png'); $bytes = $imagick->getImageBlob(); if (strlen($bytes) <= 0) { echo "Failed to generate image.";} } setImageBias($bias) ; echo "Ok"; ?> --EXPECTF-- Ok