Call the AspJpeg component to add a watermark to the picture logo

Source: Internet
Author: User
Tags save file

function Water_jpeg (FILENAMEB)
Dim Water_file,logo
Water_file = Server.MapPath (".. /logo_water.png ")
Filenameb = Server.MapPath (FILENAMEB)
Dim Jpeg
Set Jpeg = Server.CreateObject ("Persits.jpeg")
If-2147221005=err Then
Response.Write "No this component, please install!" ' Check whether to install

AspJpeg components
Response.End ()
End If
Jpeg.open (FILENAMEB) ' Open picture
If Jpeg.width >= and Jpeg.height >= Then
If Err.Number Then
Response.Write "Open picture failed, please check the path!" "
Response.End ()
End If
Set Logo = Server.CreateObject ("Persits.jpeg")
Logo.open water_file ' Open watermark picture

Jpeg.drawimage jpeg.width-300, jpeg.height-90,

Logo,0.8,&hffffff ' parameter order: horizontal coordinates, vertical coordinates, logo address, transparency, pumping

Fetch color (&h 16)
  jpeg.save filenameb ' save file
  set Logo = Nothing
 end if
& Nbsp;set Jpeg = Nothing
End Function
Site original. NET Tutorial ">www.111cn.net

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.