method brightness documentation in bbn\File\Image
Adjusts the image's brightness.
Example
$img = new bbn\File\Image("/home/data/test/image.jpg");
$img->brightness();
$img->brightness("-");
function($val = '+')
{
if ($this->test()) {
if (self::isImagick()) {
$p = ( $val == '-' ) ? 90 : 110;
if (!$this->img->modulateImage($p,100,100)) {
$this->error = X::_("There has been a problem");
}
}
elseif (function_exists('imagefilter')) {
$p = ( $val == '-' ) ? -20 : 20;
if (!imagefilter($this->img,IMG_FILTER_BRIGHTNESS,-20)) {
$this->error = X::_("There has been a problem");
}
}
}
return $this;
}
Adjusts the image's brightness. BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2025
BBN Solutions