110,567
社区成员
发帖
与我相关
我的任务
分享
Bitmap bmp = new Bitmap(strFileName)
Bitmap bmp = null;
byte[] byFile = File.ReadAllBytes("C:\\123.png");
using (MemoryStream ms = new MemoryStream(byFile)) {
bmp = new Bitmap(ms);
}
[/quote]
ms不能作为参数传递给他的构造函数[/quote]
你是在逗我吗- -!
https://msdn.microsoft.com/zh-cn/library/system.drawing.bitmap.bitmap.aspx
Bitmap(Stream) 从指定的数据流初始化 Bitmap 类的新实例。
Bitmap bmp = null;
byte[] byFile = File.ReadAllBytes("C:\\123.png");
using (MemoryStream ms = new MemoryStream(byFile)) {
bmp = new Bitmap(ms);
}
[/quote]
ms不能作为参数传递给他的构造函数
Bitmap bmp = null;
byte[] byFile = File.ReadAllBytes("C:\\123.png");
using (MemoryStream ms = new MemoryStream(byFile)) {
bmp = new Bitmap(ms);
}
[/quote]
哦~~~~我来试试
Bitmap bmp = null;
byte[] byFile = File.ReadAllBytes("C:\\123.png");
using (MemoryStream ms = new MemoryStream(byFile)) {
bmp = new Bitmap(ms);
}