Page 1 of 1

+level in Imagick

Posted: 2014-11-04T05:38:22-07:00
by marcospassos
Hi folks,

I have been trying to reproduce the Imagemagick's "+level" option using PHP without success. Currently, is there any way to achieve such result?

My attempt:

Code: Select all

convert -size 500x100 gradient:black-white +level 50x100% 

Code: Select all

$test = new Imagick();
$test->newPseudoimage(500, 100, 'gradient:black-white');
$maxQuantum = $test->getquantumrange()['quantumRangeLong'];
$test->levelimage($maxQuantum * 0.5, 1.0, $maxQuantum);
The result I'm reaching is similar to the "-level", but is the "+level" that I want to. Does anyone could help me?