method grayscale documentation in bbn\File\Image
Converts the image's color to grayscale.
Example
$img = new bbn\File\Image("/home/data/test/image.jpg");
$img->grayscale()->save();
function()
{
if ($this->test()) {
if (self::isImagick()) {
if (!$this->img->modulateImage(100,0,100)) {
$this->error = X::_("There has been a problem");
}
}
elseif (function_exists('imagefilter')) {
if (!imagefilter($this->img,IMG_FILTER_GRAYSCALE)) {
$this->error = X::_("There has been a problem");
}
}
}
return $this;
}
Converts the image's color to grayscale. 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