'Dim Bar As New BarCodeBuilder
'Bar.Symbology =
Barpro.Symbology.QRCode
'Bar.BarRatio = 0.3
'Bar.BarWidth = 1
'Bar.BarHeight = 1
'Bar.QuietZoneWidth = 2
For Each r As DataRow In
DataTables("newtrj").Select("id>1") '从数据表中提取数据
' bar.Code = r("qrcord")
Dim fn As String = ""
fn = r("cn_name")
Dim vv As String = fn & ".jpeg"
If fn <> "" And
filesys.FileExists("d:\as\" & vv) = True Then
Dim route As String =
"d:\as\" & vv '原始照片存放路径
Dim route2 As String
="d:\qrcord\" & vv
Dim zwidth = getImage(route).width '原始照片宽
Dim zheight = getImage(route).height '原始照片高
Dim p As WinForm.Painter
=e.Form.CreateControl("p", ControlTypeEnum.Painter)
p.Width = zwidth '原始照片宽动态赋给画板宽
p.Height = zheight '原始照片高动态赋给画板高
Dim g As Graphics = p.Graphics
g.Clear(Color.White)
g.DrawImage(getImage(route),0,0,zwidth,zheight)
'
g.DrawImage(bar.GetImage,(zwidth-200),(zheight-680),150,150)
Dim rm As New prt.RenderImage '定义一个图片对象
'rm.Image =
GetImage("archives.ico") '设置图片
'rm.Style.ImageAlign.StretchHorz = True
'水平拉伸
'g.DrawImage(rm.Image,(zwidth-75),(zheight-85),30,30)
Dim fnt As New Font("黑体",30,FontStyle.Bold)
'黑体,10号,加粗
g.DrawString(fn,fnt,Brushes.Aqua,(zwidth-280),(zheight-38))
p.Repaint()
' Dim img As Image = p.Image
'
p.Save(route2)
'
img.save(route2)
Dim img As Image = p.Image
'p.Save(route2)
img.save(route2,System.Drawing.Imaging.ImageFormat.jpeg)
End If
Next
MessageBox.Show("全部添加成功!",
"提示")