sbyte[][] img = byteIMG.Array; Bitmap bmp = new Bitmap(strWidth, strHeight); Graphics g = Graphics.FromImage(bmp); g.Clear(Color.White); for (int i = 0; i <= img.Length - 1; i++) { for (int j = 0; j <= img[i].Length - 1; j++) { if (img[j][i] == 0) { g.FillRectangle(Brushes.Black, i, j, 1, 1); } else { g.FillRectangle(Brushes.White, i, j, 1, 1); } } } bmp.Save("C:\\" + strFileName + ".jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)