我试图在GDI +中使用图元文件进行绘制,任何人都可以告诉我为什么我的代码不起作用,我的文件大约只有1KB :(
private void button1_Click(object sender, EventArgs e)
{
Metafile img = new Metafile(@"D:\anh.emf");
Graphics g = Graphics.FromImage(img);// out of memory exception.
//g.FillRectangle(Brushes.LightYellow, 0, 0, 100, 100);
//pictureBox1.Image = img;
img.Dispose();
g.Dispose();
}