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:
Average the red, green and blue values. Simple, but the result probably won't look right unless you weight the values first.
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.
精彩评论