示例#1
0
        private void _FillBitmap(Bitmap b)
        {
            FastBitmap givenB = new FastBitmap(b);

            for (int i = 0; i < this.Width; ++i)
            {
                for (int j = 0; j < this.Height; ++j)
                {
                    this.SetPixel(i, j, givenB.GetPixel(i % givenB.Width, j % givenB.Height));
                }
            }
        }
        private Color[] _GetInitialColors(FastBitmap image)
        {
            int width  = image.Width;
            int height = image.Height;
            int length = width * height;

            Color[] res = new Color[length];

            int cnt = 0;

            for (int i = 0; i < height; ++i)
            {
                for (int j = width - 1; j >= 0; --j)
                {
                    res[cnt++] = image.GetPixel(i, j);
                }
            }

            return(res);
        }