public void Print(string outImagePath)
 {
     bool[,] img = new bool[height, width];
     for (int i = 0; i < width; i++)
     {
         for (int j = 0; j < height; j++)
         {
             if (char_labels[j * width + i] != 0)
             {
                 img[j, i] = true;
             }
             else
             {
                 img[j, i] = false;
             }
         }
     }
     ImageUtils.ArrayBool2DToBitmap(img).Save(outImagePath, ImageFormat.Png);
 }
 public Bitmap Print()
 {
     bool[,] img = new bool[height, width];
     for (int i = 0; i < width; i++)
     {
         for (int j = 0; j < height; j++)
         {
             if (char_labels[j * width + i] != 0)
             {
                 img[j, i] = true;
             }
             else
             {
                 img[j, i] = false;
             }
         }
     }
     return(ImageUtils.ArrayBool2DToBitmap(img));
 }
 public void PrintSubStringsSmall(ushort[] char_labels, TextString ts, int margin)
 {
     bool[,] stringimg = new bool[ts.bbx.Height + margin, ts.bbx.Width + margin];
     for (int i = 0; i < ts.char_list.Count; i++)
     {
         for (int xx = ts.bbx.X; xx < ts.bbx.X + ts.bbx.Width; xx++)
         {
             for (int yy = ts.bbx.Y; yy < ts.bbx.Y + ts.bbx.Height; yy++)
             {
                 if (char_labels[yy * width + xx] == ts.char_list[i].pixel_id)
                 {
                     stringimg[yy - ts.bbx.Y + margin / 2, xx - ts.bbx.X + margin / 2] = true;
                 }
             }
         }
     }
     if (ts.char_list.Count > 0)
     {
         ts.srcimg = ImageUtils.ArrayBool2DToBitmap(stringimg);
     }
 }