EvaluateOperator

Magick.NET is an object-oriented C# interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick.NET
Locked
spinningCat
Posts: 2
Joined: 2020-04-07T11:46:06-07:00
Authentication code: 1152

EvaluateOperator

Post by spinningCat »

Hello

I am newbie in magick.net still try to figure out what i can do with magick.net. Can someone tell me what this piece of code is doing.

MagickImage first = new MagickImage(@"...kitchen (1).jpg");
images.Add(first);
using (IMagickImage result = images.Evaluate(EvaluateOperator.UniformNoise))
{
// Save the result
result.Write(@"...\uniform.png");
}

Thanks

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

Re: EvaluateOperator

Post by snibgo »

I'm not sure what you are asking. Where did that code come from?

I suppose the code you show wouldn't compile because I don't think "IMagickImage" is a valid type.

Aside from that, "what this piece of code is doing" should be clear from the code. It reads an image from a file, then adds it to a list, then does the equivalent to "-evaluate-sequence UniformNoise", and writes the single-image result to a file.

Doing this to an image list doesn't seem sensible.
snibgo's IM pages: im.snibgo.com

spinningCat
Posts: 2
Joined: 2020-04-07T11:46:06-07:00
Authentication code: 1152

Re: EvaluateOperator

Post by spinningCat »

Hello again thanks for answer.

using (IMagickImage result = images.Evaluate(EvaluateOperator.UniformNoise))

This piece of code actually worked. If i use MagickImage i got conversation error that is below.

"cannot implicitely convert IMagickImage to MagickImage."

Thank you for sharing imagemagick equivalent command. Let me take look at that.

Locked