CSharp examples for System.Drawing:Image Convert
Convert byte array to Bitmap
using System.Drawing; public class Main{ /// <summary> /// Converte um array de bytes em um bitmap /// </summary> /// <param name="instance">Objeto a ser convertido</param> /// <returns>Bitmap convertido</returns> public static Bitmap ToBitmap(this byte[] instance) {//w w w .ja va2 s . c o m ImageConverter ic = new ImageConverter(); System.Drawing.Image img = (System.Drawing.Image)ic.ConvertFrom(instance); Bitmap bitmap = new Bitmap(img); return bitmap; } }