How to write this ImageMagick command in Magick.NET?
Posted: 2017-09-26T10:34:08-07:00
Hi,
I need to write this convert in C#, but I just can't wrap my head around it. I can't find any equivalent for +swap, minus has two options in Magick.NET (minusDst, minusSrc), etc. Can someone please help me with this?
Here is the convert command:
Here is my code:
Thanks in advance for any help!
I need to write this convert in C#, but I just can't wrap my head around it. I can't find any equivalent for +swap, minus has two options in Magick.NET (minusDst, minusSrc), etc. Can someone please help me with this?
Here is the convert command:
Code: Select all
convert pic.jpg cloneBlur.jpg +swap -compose minus -composite \( cloneComp.jpg -evaluate multiply 0.2 \) +swap -compose minus -composite -threshold 1 final.jpg
Code: Select all
using (MagickImage im = new MagickImage("pic.jpg")){
//some code
using (MagickImage cloneBlur = (MagickImage)im.Clone()){
//some code
using (MagickImage cloneComp = (MagickImage)im.Clone()){
//some code
//Here is where the convert should take place
cloneComp.Evaluate(Channels.All, EvaluateOperator.Multiply, 0.2); //this is the only part I think I got right
final.Write(final.jpg); //ends with this (or something similar)
}
}
}