Пример #1
0
        public BinaryImage Copy()
        {
            var copy = new BinaryImage(Width, Height);

            for (int x = 0; x < Width; x++)
            {
                for (int y = 0; y < Height; y++)
                {
                    copy.SetPixel(x, y, this.GetPixel(x, y));
                }
            }

            return(copy);
        }
Пример #2
0
        public BinaryImage GetBinaryImage()
        {
            var output = new BinaryImage(Width, Height);

            for (int x = 0; x < Width; x++)
            {
                for (int y = 0; y < Height; y++)
                {
                    output.SetPixel(x, y, ColorToByte(_imageData[x, y]) != 0);
                }
            }

            return(output);
        }