You should be able to do something like this:
using System.Drawing.Imaging;
using System.Drawing;
using System.IO;
byte[] bitmap = GetYourImage();
using(Image image = Image.FromStream(new MemoryStream(bitmap)))
{
image.Save("output.jpg", ImageFormat.Jpeg); // Or Png
}
Look here for more info.
Hopefully this helps.