Aspjpeg is a shared software developed by persits. The trial period is 30 days. You can download it at http://www.persits.com/asp;.exe. The latest version is 1.3.
Aspjpeg is a powerful image processing component that allows you to easily create thumbnails and add watermarks to images. The following describes how to use it:
You must first install the downloaded EXE file.
1. Create a thumbnail for the image
Code: [copy to clipboard] <% 'create an instance
Dim JPEG, path
Set JPEG = server. Createobject ("persits. jpeg ")
'Image location
Path = server. mappath ("Images") & "\ clock.jpg"
'Open
JPEG. Open Path
'Set the thumbnail size (the proportion is set to 50% here)
JPEG. width = jpeg. originalwidth/2
JPEG. Height = jpeg. originalheight/2
'Save the thumbnail to the specified folder.
JPEG. Save server. mappath ("Images") & "\ clock_small.jpg"
'Deregistering an instance
Set JPEG = nothing
%>
<p>
2. Add a watermark to an image
Code: [copy to clipboard] <%
Dim JPEG
'Create an instance
Set JPEG = server. Createobject ("persits. jpeg ")
'Open the Target Image
JPEG. Open Server. mappath ("images/dodge_viper.jpg ")
'Add a text watermark
JPEG. Canvas. Font. Color = & hff0000 'red
JPEG. Canvas. Font. Family = ""
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 ")
'Logout object
Set JPEG = nothing
%>