Converting a bitmap to monochrome

后端 未结 2 1365
走了就别回头了
走了就别回头了 2020-12-29 13:14

I am trying to save an image as monochrome (black&white, 1 bit-depth) but I\'m coming up lost how to do it.

I am starting with a png and converting to a bitmap f

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-29 14:09

    What you want is a good dithering algorithm like Floyd-Steinberg or Bayer ordered. You can either implement the binarization yourself or use a library like AForge.NET to do it for you (download the image processing samples). You can find the binarization documentation here.

提交回复
热议问题