I have not heard of anyone who translated Fred his script to C#. If I would do this myself I would create a class for each script. But I don't think if you are allowed to do this without his permission due to the license he uses.
His script 2colorthresh would translate to something like this:
His script 2colorthresh would translate to something like this:
publicstaticclass TwoColorThresh { MagickImage static Execute(MagickImage input) { // This script does the following:// convert $input +dither -colors 2 -colorspace gray -contrast-stretch 0 $output MagickImage output = input.Clone(); output.Quantize(new QuantizeSettings() { Colors = 2, // -colors 2 DitherMethod = DitherMethod.No, // +dither, ColorSpace = ColorSpace.GRAY // -colorspace gray }); // The overload below won't work until the next release. output.ContrastStretch(0); // -contrast-stretch 0return output; } }