Exemplo n.º 1
0
 protected override void Dispose(bool disposing)
 {
     base.Dispose(disposing);
     if (bmp != null)
     {
         bmp.Dispose();
         bmp = null;
     }
 }
Exemplo n.º 2
0
        public void Create(int width, int height, int bitsPerPixel)
        {
            rowStride = width * bitsPerPixel / 8;
            int colorCount = (int)Math.Pow(2, bitsPerPixel);

            colors = new uint[colorCount];
            for (int i = 0; i < colorCount; i++)
            {
                colors[i] = 0xffffffff;
            }

            size    = new Size(width, height);
            Control = new byte[height * rowStride];
            bmp     = new BitmapHandler();
            bmp.Create(size.Width, size.Height, PixelFormat.Format32bppRgb);
        }