I'm trying to autolevel an image. My code looks like this:
MagickImage image = new MagickImage(stream);
image.AutoLevel(Channels.RGB);
Later in the code I'm sending the image to a web response. For some reason, this code has no effect on the image. It looks exactly the same as the original. If I change to:
MagickImage image = new MagickImage(stream);
image.Posterize(2);
Then I clearly see the filter applied.
What am I missing with AutoLevel?
Update:
I tried this code:
var image1 = Image.Clone();
Image.AutoLevel(Channels.RGB);
var diff = Image.Compare(image1, ErrorMetric.RootMeanSquared);
and the value of diff is 0.0, while with this code (and using the same image):
var image1 = Image.Clone();
Image.Equalize();
var diff = Image.Compare(image1, ErrorMetric.RootMeanSquared);
the value of diff is 0.315