Create 1bpp mask from image

前端 未结 3 1370
灰色年华
灰色年华 2020-12-18 15:43

How do you create a 1 bit per pixel mask from an image using GDI in C#? The image I am trying to create the mask from is held in a System.Drawing.Graphics object.

I

3条回答
  •  时光说笑
    2020-12-18 15:56

    Do you mean LockBits? Bob Powell has an overview of LockBits here; this should provide access to the RGB values, to do what you need. You might also want to look at ColorMatrix, like so.

提交回复
热议问题