International PHP Conference 2015

Imagick::setImageBias

(PECL imagick 2.0.0)

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

Beschreibung

bool Imagick::setImageBias ( float $bias )

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

Parameter-Liste

bias

R├╝ckgabewerte

Liefert TRUE bei Erfolg.

Fehler/Exceptions

Wirft ImagickException bei Fehlern.

Beispiele

Beispiel #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();
}

?>

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top