How to convert pixel formats? From 32bppRGB to 16bpp grayscale in C#

后端 未结 2 1588
情深已故
情深已故 2021-01-18 18:17

I need to do some thresholding for my image. The threshold filter function just accepts 8-16bpp grayscale. My bitmap picture has the 32bppRGB

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-18 18:37

    Use AForge.NET framework Grayscale filter

    The filter accepts 24, 32, 48 and 64 bpp color images and produces 8 (if source is 24 or 32 bpp image) or 16 (if source is 48 or 64 bpp image) bpp grayscale image.

    Then apply threshold filter.

提交回复
热议问题