array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'imagick.brightnesscontrastimage.php', 1 => 'Imagick::brightnessContrastImage', 2 => 'Change the brightness and/or contrast of an image', ), 'up' => array ( 0 => 'class.imagick.php', 1 => 'Imagick', ), 'prev' => array ( 0 => 'imagick.borderimage.php', 1 => 'Imagick::borderImage', ), 'next' => array ( 0 => 'imagick.charcoalimage.php', 1 => 'Imagick::charcoalImage', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/imagick/imagick/brightnesscontrastimage.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PECL imagick 3 >= 3.3.0)
Imagick::brightnessContrastImage — Change the brightness and/or contrast of an image
$brightness, float $contrast, int $channel = Imagick::CHANNEL_DEFAULT): boolChange the brightness and/or contrast of an image. It converts the brightness and contrast parameters into slope and intercept and calls a polynomical function to apply to the image.
brightness
contrast
channel
Liefert true bei Erfolg.
Beispiel #1 Imagick::brightnessContrastImage()
<?php
function brightnessContrastImage($imagePath, $brightness, $contrast, $channel) {
$imagick = new \Imagick(realpath($imagePath));
$imagick->brightnessContrastImage($brightness, $contrast, $channel);
header("Content-Type: image/jpg");
echo $imagick->getImageBlob();
}
?>