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)
}
}
}