AspJpeg component to picture and transparent image watermark (from www.sysoft.cc)

Source: Internet
Author: User
Tags transparent image

'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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.