Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void Convert_Click(object sender, EventArgs e)
- {
- MemoryStream MemStream = new MemoryStream();
- // YourPicture = Your PictureBox
- YourPicture.Image.Save(MemStream, System.Drawing.Imaging.ImageFormat.Png);
- byte[] pngBase = MemStream.ToArray();
- MemStream.Close();
- //pngBase64 = Your TextBox
- pngBase64.Text = Convert.ToBase64String(pngBase);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement