How to add a custom threshold map #1005
Answered
by
dlemstra
derekjohn37
asked this question in
Help
-
ImageMagick has a resource configuration file for Threshold Maps for Ordered Posterized Dithering: "thresholds.xml". I would like to add a custom map for use with Magick.NET. Can this be done? (i.e. append to the thresholds.xml file) If so, any ideas how? |
Beta Was this translation helpful? Give feedback.
Answered by
dlemstra
Aug 10, 2021
Replies: 1 comment 1 reply
-
You can do that with the var configuration = ConfigurationFiles.Default;
configuration.Thresholds.Data = "<yourxml/>";
MagickNET.Initialize(configuration); Make sure you call |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
dlemstra
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can do that with the
ConfigurationFiles
class. Below is an example of how you can change the Threshold.Data configuration:Make sure you call
MagickNET.Initialize
at the start of your program.