Aspjpeg is a powerful image processing component that can easily make a thumbnail of the picture and add watermarking for the image.
1, make thumbnails for the picture
<% 'Establish an instance DIM JPEG, PATHSET JPEG = Server.createObject ("Persits.jpeg")' Picture location Path = Server.MAppath ("Images") & "/clock.jpg"
'Open JPEG.Open Path
'Set the thumbnail size (here the proportion is set to 50%) JPEG.WIDTH = JPEG.RiginalWidth / 2jpeg.Height = JPEG.ORIGINALHT / 2
'Save thumbnails to the specified folder JPEG.SAVE Server.MAPPATH ("Images") & "/clock_small.jpg"
'Logout instance set jpeg = nothing%>
2, add watermarking for the picture
<% DIM JPEG 'Establish an instance set jpeg = server.createObject ("persits.jpeg")' Open the target picture JPEG.Open Server.MAppath ("Images / Dodge_Viper.jpg")
'Add a text watermark jpeg.canvas.font.color = & hff0000' red jpeg.canvas.font.family = "Song" JPEG.CANVAS.FONT.BOLD = True Jpeg.canvas.Print 10, 10, "CopyRight (c) cnmaya "
'Save file jpeg.save server.mappath ("images / dodge_viper_framed.jpg")
'Logout Object Set Jpeg = Nothing%>