'aspjpeg--png Format'The pic.jpg will be played on the logo.png, according to the image size of the watermark to make appropriate adjustmentsfilename="pic.jpg" 'Original pictureSet JPEG1 = Server.CreateObject ("Persits.jpeg") Jpeg1.open server.mappath (filename) iwidth=jpeg1.originalwidth'the width of the pictureIheight=jpeg1.originalheight'the height of the pictureIiwidth=204 'width of the watermark pictureiiheight= + 'height of watermark image'watermark map on top leftJpeg1. Canvas.drawpng5,5, Server.MapPath ("logo.png") 'watermark map on top right'JPEG1. Canvas.drawpng iwidth-iiwidth-5, 5, Server.MapPath ("Logo.png")'watermark Map left down'JPEG1. Canvas.drawpng 5, Iheight-iiheight-5, Server.MapPath ("Logo.png")'watermark Map Right down'JPEG1. Canvas.drawpng iwidth-iiwidth-5, Iheight-iiheight-5,server.mappath ("Logo.png")'Center the Watermark map'JPEG1. Canvas.drawpng IWIDTH/2-IIWIDTH/2, IHEIGHT/2-IIHEIGHT/2, Server.MapPath ("Logo.png")jpeg1.save server.mappath (filename)'Save the watermark image will cover the original picture, can also saveSet JPEG1 =Nothing if transparency is required, PS opens adjusting PNG file transparency parameters after use.
' Merging picture watermarks ' Dim Jpeg1 ' Set JPEG1 = Server.CreateObject ("Persits.jpeg") ' jpeg1.open Server.MapPath ("Images/shuiyin.gif") ' Jpeg.Canvas.DrawImage jpegx,jpegy,jpeg1,jpegt,&hffffff ' gif format JPEGX represents the distance from the left position margin-left,jpegy represents the distance from the top position Margin-top,jpegt represents the merged transparency
AspJpeg component to picture and transparent image watermark (from www.sysoft.cc)