How to find that all pixels in an image are grey scale or has R,G,B equal value for each individual pixel

前端 未结 2 758
情深已故
情深已故 2021-01-16 18:17

Please dont quote this How can I check the color depth of a Bitmap? or How to check if a picture is in grayScale

Because an image can be 24/32 bit per pixel even if

2条回答
  •  执念已碎
    2021-01-16 18:51

    Bitmap.GetPixel() returns a Color structure which has fields R, G and B so you can just compare them however you want.

    Do note that using GetPixel() is very slow, but if you don't need speed it will do.

提交回复
热议问题