Example #1
0
        public Bitmap[] Map(params PixelMap[] map)
        {
            var count  = map.Length;
            var result = new Bitmap[count];
            var write  = new FastBitmap[count];

            for (var i = 0; i < count; i++)
            {
                var b = new Bitmap(_bitmap.Width, _bitmap.Height);
                result[i] = b;
                write[i]  = new FastBitmap(b, ImageLockMode.WriteOnly, Data.PixelFormat);
            }

            var writeRows = new byte *[count];

            for (var y = 0; y < Data.Height; y++)
            {
                var row = Row(y);
                for (var i = 0; i < count; i++)
                {
                    writeRows[i] = write[i].Row(y);
                }
                for (var x = 0; x < Data.Width; x++)
                {
                    var pixel = row + x * Bpp;
                    for (var i = 0; i < count; i++)
                    {
                        map[i](Data.PixelFormat, pixel, writeRows[i] + x * write[i].Bpp);
                    }
                }
            }

            for (var i = 0; i < count; i++)
            {
                write[i].Dispose();
            }

            return(result);
        }
Example #2
0
 public void Show(FastBitmap bitmap)
 {
 }