Level Adjustments on Image

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
rpatelob
Posts: 62
Joined: 2017-04-17T22:17:01-07:00
Authentication code: 1151

Level Adjustments on Image

Post by rpatelob » 2017-05-24T05:08:29-07:00

There is a function MagickLevelImage for level adjustment. I'm trying to apply reverse level adjustment. How do I do that?
Check out below code.

Code: Select all

	 convert test.png -level 0,1000 levelP.png
	 convert test.png +level 0,1000 levelM.png
For first command I just need to call MagickLevelImage(wand, 0, 1, 1000)
How to use +level(reverse level adjustment) using C?

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

Re: Level Adjustments on Image

Post by snibgo » 2017-05-24T07:52:16-07:00

In MagickCore, the function is LevelizeImageChannel(). This does not seem to be called anywhere in MagickWand.

However, the functions LevelizeImageChannel() and LevelImage(), which correspond to "+level" and "-level", can be used for each other, by using different parameters. See my page Levels.
snibgo's IM pages: im.snibgo.com

rpatelob
Posts: 62
Joined: 2017-04-17T22:17:01-07:00
Authentication code: 1151

Re: Level Adjustments on Image

Post by rpatelob » 2017-05-25T07:37:54-07:00

Thanks a lot @snibgo, it's working

Post Reply