Beispiel #1
0
        public static Bitmap toBitmap(ByteMatrix matrix)
        {
            int    width  = matrix.Width;
            int    height = matrix.Height;
            Bitmap bmap   = new Bitmap(width, height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);

            for (int x = 0; x < width; x++)
            {
                for (int y = 0; y < height; y++)
                {
                    bmap.SetPixel(x, y, matrix.get_Renamed(x, y) != -1 ? ColorTranslator.FromHtml("0xFF000000") : ColorTranslator.FromHtml("0xFFFFFFFF"));
                }
            }
            return(bmap);
        }
Beispiel #2
0
 public Bitmap toBitmap(ByteMatrix matrix)
 {
     int width = matrix.Width;
     int height = matrix.Height;
     Bitmap bmap = new Bitmap(width, height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
     for (int x = 0; x < width; x++)
     {
         for (int y = 0; y < height; y++)
         {
             bmap.SetPixel(x, y, matrix.get_Renamed(x, y) != -1 ? ColorTranslator.FromHtml("0xFF000000") : ColorTranslator.FromHtml("0xFFFFFFFF"));
         }
     }
     return bmap;
 }