Using MagickLevelImage to apply levels in IOS

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
amit1411
Posts: 8
Joined: 2015-08-03T22:24:14-07:00
Authentication code: 1151

Using MagickLevelImage to apply levels in IOS

Post by amit1411 »

Hi,
I am trying to apply levels on an Image using MagickLevelImage method in IOS. For this I have to provide the 0 as white point and maximum quantum range as black point. I am not sure how can I get the maximum quantum range value for the given wand? Can someone please help me with this code.
The php code I am trying to convert is :
$quantumRange= $image->getQuantumRange();
$image->levelImage(0,.05,$quantumRange ['quantumRangeLong']);

Thanks,
Amit
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Using MagickLevelImage to apply levels in IOS

Post by snibgo »

amit1411 wrote:I am not sure how can I get the maximum quantum range value for the given wand?
If I understand your question, for a Magick Wand program, the answer is to use the constant QuantumRange. This will have the value 255 or 65535 or 4294967295 or about 1.8e+19.
snibgo's IM pages: im.snibgo.com
Post Reply