Imagick::setImageBias

(PECL imagick 2.0.0)

Imagick::setImageBiasSets the image bias for any method that convolves an image

Warning

This function has been DEPRECATED as of Imagick 3.4.4. Relying on this function is highly discouraged.

Description

Imagick::setImageBias ( float $bias ) : bool

Sets the image bias for any method that convolves an image (e.g. Imagick::ConvolveImage()).

Parameters

bias

Return Values

Returns TRUE on success.

Errors/Exceptions

Throws ImagickException on error.

Examples

Example #1 Imagick::setImageBias()

<?php
//requires ImageMagick version 6.9.0-1 to have an effect on convolveImage
function setImageBias($bias) {
    
$imagick = new \Imagick(realpath("images/stack.jpg"));

    
$xKernel = array(
        -
0.7000.70,
        -
0.7000.70,
        -
0.7000.70
    
);

    
$imagick->setImageBias($bias * \Imagick::getQuantum());
    
$imagick->convolveImage($xKernel, \Imagick::CHANNEL_ALL);

    
$imagick->setImageFormat('png');
    
    
header('Content-type: image/png');
    echo 
$imagick->getImageBlob();
}

?>