byte [] buffer = new byte [1]; //Byte轉(zhuǎn)為Image對(duì)象 MemoryStream ms = new MemoryStream(buffer); Image image = System.Drawing.Image.FromStream(ms); //設(shè)置畫布,繪畫新圖片 Bitmap b = new Bitmap(200, 200); Graphics g = Graphics.FromImage((System.Drawing.Image)b); g.InterpolationMode = InterpolationMode.HighQualityBicubic; //繪制圖像 g.DrawImage(image, 0, 0, 200, 200); g.Dispose(); //保存圖片 b.Save( "aaaaaaaaa" ); |
|