How to convert PNG Base64 PNG image string to PNG format in C #

Possible duplicate:
converting a base 64 string to an image and saving it

I have a PNG image encoded as a Base64 string. I need to convert this string to PNG format. How can I convert this to C #?

+7
source share
1 answer
byte[] data = Convert.FromBase64String(base64String); using(var stream = new MemoryStream(data, 0, data.Length)) { Image image = Image.FromStream(stream); //TODO: do something with image } 
+18
source

All Articles