Click here to Skip to main content
15,877,915 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
1. convert base64 string into byte[] array.
2.pass this byte array in memorystearm.
3.display jpeg image in picturebox.
Posted

1 solution

Working with base64: use the class System.Convert:
http://msdn.microsoft.com/en-us/library/dsfy6sz9.aspx[^].

Pass byte array in memory stream? Just read on the type System.IO.MemoryStream and pay attention for its constructor System.IO.MemoryStream.MemoryStream(byte[]), please see:
http://msdn.microsoft.com/en-us/library/system.io.memorystream.aspx[^].

You can read the image using System.Drawing.Image.FromStream or System.Drawing.Image.FromFile. Obtain the reference this way, assign it to System.Windows.PictureBox.Image, please see:
http://msdn.microsoft.com/en-us/library/system.drawing.image.aspx[^],
http://msdn.microsoft.com/en-us/library/system.windows.forms.picturebox.aspx[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900