aspJpeg图片水印有杂点的完美解决方法
aspJpeg图片水印有杂点的完美解决方法
发布时间:2016-12-29 来源:查字典编辑
摘要:操作实现函数:复制代码代码如下:FunctionAddWater(n)SetPhoto=Server.CreateObject("Persi...

操作实现函数:

复制代码 代码如下:

Function AddWater(n)

Set Photo = Server.CreateObject("Persits.Jpeg")

PhotoPath = Server.MapPath(n)

Photo.Open PhotoPath

Photo.Interpolation=1

Photo.Quality=100

iWidth=Photo.OriginalWidth

iHeight=Photo.OriginalHeight

iiwidth=214 '水印图片的宽度

iiheight=51 '水印图片的高度

Photo.Canvas.DrawPNG iWidth-iiWidth-5, iHeight-iiHeight-5,Server.MapPath("Water.png") 'Water.png即为水印图片

Photo.save Server.mappath(n) '输出图片

Set Photo = Nothing

End Function

调用方法:

<% Call AddWater(图片名称)%>

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新ASP教程学习
热门ASP教程学习
编程开发子分类