加载 emf 文件时 RawFormat 错误
我正在尝试将 emf 文件加载到图像对象中,但是 RawFormat 始终不正确 {[ImageFormat: b96b3cac-0728-11d3-9d7b-0000f81ef32e]} 而不是 Emf。我尝试从文件流和内存流加载。我还尝试创建元文件对象而不是图像,但无济于事。这是一个错误还是还有其他我不知道的技巧?
MemoryStream stream = new MemoryStream(imageData);//imageData is a byte array
Image tempImage = Image.FromStream(stream);
I'm trying to load an emf file in to an Image Object, however the RawFormat is always incorrect {[ImageFormat: b96b3cac-0728-11d3-9d7b-0000f81ef32e]} instead of Emf. I've tried loading from a file stream and memory stream. I've also tried creating a MetaFile object instead of an Image but to no avail. Is this a bug or there some other trick I don't know about?
MemoryStream stream = new MemoryStream(imageData);//imageData is a byte array
Image tempImage = Image.FromStream(stream);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这有帮助吗?
System.Drawing.Imaging.ImageFormat.Emf.Guid = {b96b3cac-0728-11d3-9d7b-0000f81ef32e}
丹
Does this help?
System.Drawing.Imaging.ImageFormat.Emf.Guid = {b96b3cac-0728-11d3-9d7b-0000f81ef32e}
Dan