首页 > 代码库 > ImageHelper

ImageHelper

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;using System.Drawing;namespace WindowsFormsApplication3.Utility{    class ImageHelper    {        private ImageHelper() { }        public static Icon GetIconFromBase64String(string base64String) {            using (MemoryStream memoryStream = new MemoryStream(Convert.FromBase64String(base64String))) {                return new Icon(memoryStream);            }        }        public static Image GetImageFromBase64String(String base64String) {            using (MemoryStream memoryStream = new MemoryStream(Convert.FromBase64String(base64String))) {                return new Bitmap(memoryStream);            }        }    }}