将数据流转成图片时报错,内存不足,不知道怎么处理,求大神指点
//解析json串
JObject JsonTrackData = (JObject)JsonConvert.DeserializeObject(TrackData);
//获取imageInfo
string imgStrData = JsonTrackData["result"]["imageInfo"].ToString();
//得到图片字节码
//Base6解码
byte[] bytes_data = Convert.FromBase64String(imgStrData);
string urlData = Server.MapPath("~/TrackImage/Data.png");
MemoryStream stream1 = new MemoryStream(bytes_data);
Bitmap btm = new Bitmap(stream1);
stream1.Position = 1333300;
System.Drawing.Image imgData = Image.FromStream(stream1);//报错内存不足
imgData.Save(urlData, System.Drawing.Imaging.ImageFormat.Png);//xxx.jpeg为文件名