以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]图片加水印(LOGO) (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=99267) |
-- 作者:haotinghua -- 发布时间:2017/4/15 20:47:00 -- [求助]图片加水印(LOGO) 只是实现突破加LOGO的功能(不是打印专业报表),在论坛里面查找到可以实现加字符水印的方法,如下: Dim img As Image = getimage("D:\\新建文件夹\\123.jpg") Dim g As Graphics = Graphics.FromImage(img) Dim fnt As New Font("宋体",16) Dim msg As String = "测试水印" g.DrawString(msg,fnt,Brushes.Red,20,20) img.Save("D:\\新建文件夹\\456.jpg") g.Dispose() 寻求如何加LOGO的代码,谢谢!
|
-- 作者:有点蓝 -- 发布时间:2017/4/16 9:20:00 -- Dim img As Image = getimage("D:\\新建文件夹\\123.jpg") Dim g As Graphics = Graphics.FromImage(img) g.DrawImage(getImage("D:\\logo.png"),30,30) Dim fnt As New Font("宋体",16) Dim msg As String = "测试水印" g.DrawString(msg,fnt,Brushes.Red,20,20) img.Save("D:\\新建文件夹\\456.jpg") g.Dispose()
|
-- 作者:haotinghua -- 发布时间:2017/4/16 10:53:00 -- 谢谢版主! |