Thumbnails and watermarks for making pictures with ASPJPEG components

xiaoxiao2021-03-06  108

Aspjpeg is a shared software for Persits, and the trial period is 30 days, you can download: http://www.persits.com/aspjpeg.exe. The latest version number is 1.3ASPJPEG is a powerful image processing component that can easily make a thumbnail of the picture and add watermarking for the image. Let's take a brief introduction to how to use: You first do the downloaded EXE file, install the component 1, create thumbnails <% 'for image DIM JPEG, PathSet Jpeg = Server.createObject ("Persits.jpeg")' Picture The location path = server.mappath ("images") & "/clock.jpg" Open JPEG.Open Path 'Set the thumbnail size (here the scale is set to 50%) JPEG.WIDTH = jpeg.originalWidth / 2jpeg.Height = JPEG.ORIGINALHEIGHT / 2 'Save thumbnails to the specified folder JPEG.SAVE Server.mAppath ("Images") & "/clock_small.jpg"' Logout instance set jpeg = Nothing%>

2, add the watermark function <% DIM JPEG 'to establish an instance set jpeg = server.createObject (" persits.jpeg ")' Open the target picture JPEG.Open Server.mappath ("Images / DODGE_VIPER.JPG") 'Add 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.org" 'save the file Jpeg.Save Server.MapPath ( "images / dodge_viper_framed.jpg")' cancellation objects Set Jpeg = Nothing%> author: allen personal website : Http://www.cnmaya.org/

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

New Post(0)