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.3 - High-Quality Image Thumbnail Component

If you need to resize images on the fly, consider AspJpeg. 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 industry-standard image resizing algorithms: Nearest-Neighbor, Bilinear and Bicubic.
  • Resultant thumbnails can be saved to disk or sent directly to client browser for better performance.
  • Source images may reside on disk or in a database.
  • 90-degree rotation.
  • Typing and drawing over images.
  • Image sharpening, cropping and flipping.
  • Access to the size information of source images.
  • Support for the JPEG, PNG, and BMP formats.
  • Adjustable degree of JPEG compression.
  • Picture-in-picture support. New in AspJpeg 1.3
  • GIF support. New in AspJpeg 1.3
  • Saves thumbnails directly in the database as BLOBs. New in AspJpeg 1.3

What's New in AspJpeg 1.3

  • Picture-in-picture support. An image can be drawn on top of another image via the method Jpeg.DrawImage. Opacity and transparency parameters are provided.
  • GIF support. With the expiration of the LZW patent in the US on June 19, 2003, the GIF format is finally in the public domain (at least in the US). AspJpeg now supports this popular format along with JPEG, BMP, and PNG.
  • Jpeg.Binary property. Now a thumbnail can be sent directly to the database as a BLOB without creating a temporary copy on disk.
  • What's New in AspJpeg 1.2

  • Opening images directly from the database. The new version can open source images stored in the database via the OpenBinary method. Previous versions could only open image files stored on the hard drive.
  • 90-degree rotation. In addition to flipping, AspJpeg 1.2 also offers 90-degree rotation of images both clockwise and counter-clockwise via the methods RotateR and RotateL, respectively.
  • Canvas property, sub-properties Canvas.Font, Canvas.Pen, and Canvas.Brush, and sub-methods Canvas.Print, Canvas.Line, Canvas.Bar, etc. You can now write text phrases over the thumbnails in different fonts, sizes and colors. You can also draw lines, rectangles and circles in various pen widths and colors.
  • Support for other graphic formats, including BMP and PNG.
  • RegKey property. A registration key can now be set programmatically by script.
  • Version property. The current component version can be queried programmatically by script.
  • 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.86MB).

    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 - 2003 Persits Software, Inc.
    All Rights Reserved
    AspUpload® is a registered trademark of Persits Software, Inc.
    Questions? Comments? Write us!