How to generate a monochrome bitmap with a bit depth of 1 in BMP format? #1619
Answered
by
dlemstra
jingxin2015
asked this question in
Help
-
Due to printing requirements, I need to use it NET6 generates a monochrome bitmap in BMP format with a bit depth of 1, a white background, and black text. May I ask Magick Can NET be implemented? My program needs to be deployed on the Ubuntu system, thank you! |
Beta Was this translation helpful? Give feedback.
Answered by
dlemstra
Apr 30, 2024
Replies: 2 comments 2 replies
-
This should already be supported? What have you tried so far? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I tried the above code and the generated image is still 32-bit deep. If the format is set to MagickFormat Bmp3 generates a depth of 24 bits. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should set
image.ColorType
toColorType.Bilevel
after you have called.Draw(image)
. This makes sure that the image becomes monochrome.