vs帮助说.NET Framework 的 GDI+ 组件没有可用来将文件另存为 .wmf 或 .emf 文件的编码器,实际保存的是png格式,可能要第三方的编码器才行,比如Adobe Illustrator SDKs:http://www.adobe.com/devnet/illustrator/sdk.html或者提高一下图像质量
Dim Bar As New BarCodeBuilder
Bar.Symbology = Barpro.Symbology.Code128
Bar.Code = "010501301"
Bar.BarRatio = 0.8
Bar.BarHeight = 8
Bar.DisplayCode = False
'bar.SaveImage("c:\测试条形码.jpg",600)
Dim bmp = New Bitmap(bar.GetImage())
Dim gs = Graphics.FromImage(bmp)
Dim mf = New Imaging.Metafile("F:\0051.wmf", gs.GetHdc())
Dim g = Graphics.FromImage(mf)
g.SmoothingMode = Drawing2D.SmoothingMode.HighQuality
g.CompositingQuality = Drawing2D.CompositingQuality.HighQuality
g.InterpolationMode = Drawing2D.InterpolationMode.HighQualityBicubic
g.DrawImageUnscaled(bmp, 0, 0)
g.Save()
g.Dispose()