method contrast documentation in bbn\File\Image
Adjusts the image contrast.
Example
$img = new bbn\File\Image("/home/data/test/image.jpg");
$img->contrast("-");
$img->contrast();
function($val = '+')
{
if ($this->test()) {
if (self::isImagick()) {
$p = ( $val == '-' ) ? 0 : 1;
if (!$this->img->contrastImage($p)) {
$this->error = X::_("There has been a problem");
}
}
elseif (function_exists('imagefilter')) {
$p = ( $val == '-' ) ? -20 : 20;
if (!imagefilter($this->img,IMG_FILTER_CONTRAST,-20)) {
$this->error = X::_("There has been a problem");
}
}
}
return $this;
}
Adjusts the image contrast. 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