Exemplo n.º 1
0
 public override bool HasColor(int[] color, int[] threshold)
 {
     for (int y = 0; y < bmp.Height; y++)
     {
         for (int x = 0; x < bmp.Width; x++)
         {
             if (Bitmap24.PixelEqual(color, this.GetPixel(x, y), threshold))
             {
                 return(true);
             }
         }
     }
     return(false);
 }
Exemplo n.º 2
0
        public override 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 (Bitmap24.PixelEqual(color, this.GetPixel(x, y), threshold))
                    {
                        count++;
                    }
                }
            }
            return(count);
        }