public static System.Drawing.Bitmap ImageArrayToBitmap( byte[] imageData)
{
    System.IO.MemoryStream mstream = 
    new System.IO.MemoryStream(imageData, 0, imageData.Length);
    mstream.Write(imageData, 0, imageData.Length);
    System.Drawing.Bitmap newBitmap = new System.Drawing.Bitmap(mstream);
    mstream.Flush();
    mstream.Dispose();
    return newBitmap;
}