+level in Imagick

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
marcospassos
Posts: 13
Joined: 2014-09-26T08:23:47-07:00
Authentication code: 6789
Contact:

+level in Imagick

Post 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?
Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests