Replies: 2 comments 1 reply
-
What have you tried so far? Most options are methods on the |
Beta Was this translation helpful? Give feedback.
1 reply
-
Your command would translate to this: // convert input.tif
using (var image = new MagickImage("input.tif"))
{
// -negate
image.Negate();
// -lat 20x20+1%
image.AdaptiveThreshold(20, 20, new Percentage(1));
// -negate
image.Negate();
// result.TIF (no need to do that)
/* image.Write("result.TIF"); */
// result.tif -write MPR:source (clone the image instead)
using (var source = image.Clone())
{
// -morphology close rectangle:3x4
image.Morphology(MorphologyMethod.Close, Kernel.Rectangle, "3x4");
// -clip-mask MPR:source
image.SetWriteMask(source);
// -morphology erode:8 square
image.Morphology(MorphologyMethod.Erode, Kernel.Square, 8);
// +clip-mask
image.RemoveWriteMask();
// result1.tif
image.Write("result1.tif");
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dear Expert.
How to convert the following CmdLine features to .Net API
2)convert result.tif -write MPR:source -morphology close rectangle:3x4 -clip-mask MPR:source -morphology erode:8 square +clip-mask result1.tif
Best Regards
Tony Chu
Beta Was this translation helpful? Give feedback.
All reactions