public virtual bool HasColor(int[] color, int[] threshold) { for (int y = 0; y < bmp.Height; y++) { for (int x = 0; x < bmp.Width; x++) { if (FastBitmap.PixelEqual(color, this.GetPixel(x, y), threshold)) { return(true); } } } return(false); }
public virtual int CountColor(int[] color, int[] threshold) { int count = 0; for (int y = 0; y < bmp.Height; y++) { for (int x = 0; x < bmp.Width; x++) { if (FastBitmap.PixelEqual(color, this.GetPixel(x, y), threshold)) { count++; } } } return(count); }