Home
What's New

User Manual
Object Reference
Live Demos
Support

XUpload
JUpload
AspJpeg

Download
Purchase

Clients
Other Products
Contact Us

Newsletter Signup


AspJpeg 1.1 - High-Quality JPEG Thumbnail Component

If you need to resize JPEG images on the fly, consider AspJpeg 1.1. This easy-to-use component enables you to create high-quality image thumbnails in just a few lines of code.

If you are developing an online photo album or any other web-based application where users can upload their digital pictures to the server, AspJpeg can be used in tandem with AspUpload to create thumbnails of the images as they are being uploaded. AspJpeg makes a great companion to the Persits Software upload suite.

AspJpeg features include:

  • Support for three popular image resizing algorithms: Nearest-Neighbor, Bilinear and Bicubic.
  • Resultant thumbnails can be saved to disk or sent directly to client browser for better performance.
  • Image sharpening, cropping and flipping New in 1.1
  • Access to the size information of source images.
  • Adjustable degree of JPEG compression.
  • Currently, only the JPEG format is supported.

What's New in AspJpeg 1.1

Image Sharpening

AspJpeg 1.1 offers image sharpening functionality via the Sharpen(radius, amount) method. The image on the left (see below) is a regular thumbnail with no sharpening applied. The image on the right is sharpened via the method call

Jpeg.Sharpen 1, 120

Cropping

AspJpeg 1.1 enables you to crop image thumbnails via the method Crop(x0, y0, x1, y1):

Flipping

With AspJpeg 1.1, you can also flip an image vertically and/or horizontally via the methods FlipV and FlipH, respectively.

Code Sample 1: Simple Resizing

The following script opens a JPEG image on the hard drive, resizes it and saves the resultant thumbnail back to disk.

<%
' Create an instance of AspJpeg
Set Jpeg = Server.CreateObject("Persits.Jpeg")

' Compute path to source image
Path = Server.MapPath("images") & "\test.jpg"

' Open source image
Jpeg.Open Path

' Decrease image size by 50%
Jpeg.Width = Jpeg.OriginalWidth / 2
Jpeg.Height = Jpeg.OriginalHeight / 2

' Optional: apply sharpening
Jpeg.Sharpen 1, 150

' Create thumbnail and save it to disk
Jpeg.Save Server.MapPath("images") & "\test_small.jpg"
%>

Code Sample 2: Sending a Thumbnail Directly to Browser

AspJpeg is capable of sending a thumbnail directly to the client browser rather than saving it to disk. An image resizing script can be invoked via the SRC attribute of an <IMG> tag as follows:

<IMG SRC="resize.asp?path=c:\dir\myimage.jpg&width=100">

The script resize.asp may look like this:

<%
' IMPORTANT: This script must not contain any HTML tags
' Create an instance of AspJpeg object
Set jpeg = Server.CreateObject("Persits.Jpeg")

jpeg.Open( Request("path") )

' Set new width
jpeg.Width = Request("width")

' Set new height, preserve original width/height ratio
jpeg.Height = _
  jpeg.OriginalHeight * jpeg.Width / jpeg.OriginalWidth

' Send thumbnail data to client browser
jpeg.SendBinary
%>

Check Out the AspJpeg Live Demo!

Why wait? Put AspJpeg to work now! Upload a JPEG image to our server and let the AspJpeg component show you what it can do.

Download & Purchase AspJpeg

The AspJpeg setup comes with many more code samples and a complete user manual. Download your free 30-day trial version now (1.23MB).

Purchase AspJpeg with your credit card on-line. We accept Visa, MasterCard and American Express.

Single Server License$150.00
Enterprise License
(component can be installed on any number of servers within a single organization)
$450.00


Copyright © 1998 - 2001 Persits Software, Inc.
All Rights Reserved
AspUpload® is a registered trademark of Persits Software, Inc.
Questions? Comments? Write us!