ASPJPEG component instructions

xiaoxiao2021-03-06  103

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%>

转载请注明原文地址:https://www.9cbs.com/read-102724.html

New Post(0)