Example #1
0
        //Removes pixels of a certain color
        private void RemoveColor(PixelState[,] pixels, GridRemovalSettings gridSettings, PixelState pxState)
        {
            for (int x = 0; x < bmp.Width; x++)
            {
                for (int y = 0; y < bmp.Height; y++)
                {
                    int value = discretize.DiscretizeValueForeground(x, y, gridSettings.color);

                    if (!discretize.PixelIsOn(value, gridSettings))
                    {
                        pixels[x, y] = pxState;
                    }
                }
            }
        }