Get the percentage usage of every colour in an image
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have this one working but it is so damn slow on jpeg images and also needs some changing. I need to know the individual colours in an image (with a tolerance of +/- 1 for RGB) and the % of the image that is that colour. so if an image was black and white it would say something like White : 74% Black : 26% The code below works like I said but I need to add a tolerance system as well and I have no idea on how I would do that. private Dictionary<string, string> getPixelData(Bitmap image) { Dictionary<string, string> pixelData = new Dictionary