开发者

Is there an easy way to convert an image to grayscale with .NET

I need to convert all the ima开发者_运维问答ges in a folder to greyscale (I believe their gif files if that matters). Any suggestions? I have .NET 3.5 (sp1)


Maybe you can do like this guy. Or maybe like so


There are different approaches:

  1. Average the red, green and blue values. Simple, but the result probably won't look right unless you weight the values first.

  2. Convert the image to Hue, Lightness and Saturation values and take the lightness.

You can read images using the Image class. There's a method to read the image from file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜