csImageFile - ASP Image Component

This is a COM object which enables an ASP or other server side scripts to create, edit and resize image files. The trial version of csImageFile is fully functional (up to the expiry date) allowing the component to be tested completely before deciding to buy the licensed version. We also have a large number of web pages detailing how to use the component. Follow the links on this page or directly from the site map.

The component is supplied as two DLL files. One is for 32 bit systems and the other for 64 bit.

  • Resize and scale images. Create thumbnail images from an ASP script.
  • Allows input as a file from the server, from a remote url, or as binary data from a database.
  • Accepts input direct from the csASPUpload component.
  • Send output to the server, or stream it to a database or browser.
  • Create compound images, pasting one on top of the other.
  • Place text onto the image using any installed font with optional antialiasing. Support for Unicode characters.
  • Perform simple image editing drawing lines and shapes with optional colour fills.
  • Uses JPG, GIF, BMP, PNG, PSD, PCX, TIFF and WBMP image formats and can convert between them. Can export to PDF.
  • Read and edit IPTC text in JPG, TIFF and PSD images.
  • Read and edit EXIF atributes from JPG and TIF files.
  • ICC Color Profiles can be preserved in JPG files.
  • Available as 32 bit or 64 bit.

First launched in 2001, csImageFile has proved to be a powerful server side image editing tool at a competitive price. Over time we have made improvements following customer feedback to provide the functionality that is needed for graphic processing with ASP, and other COM enabled environments running on a Windows platform. While it is mostly used in server side ASP scripts, it can be used with other scripting systems such as ASP.NET and Cold Fusion as well as batch programming with VBScript.

For working in a visual programming environment or for client side applications, try our ActiveX image control, csXImage.

Image Resizing

csImageFile can be used to resize images, using the Resize, ResizeFit or Scale methods. Images can be resized "on the fly" following a user upload or to produce a thumbnail gallery. Alternatively, a script can be written to resize all the images in a folder as part of a batch processing operation. The many image editing features allow for edits to be made during the resize, such as adding a watermark or text.

ASP image resize example.
ASP image upload and resize example, saving to file.
ASP image upload and resize example, saving to database.
Photo gallery thumbnail example.

Image Editing

Methods are provided that allow lines and shapes to be drawn. Text can be added in any font supported by the system and this can be antialiased or made partially transparent. A new image can be created with the NewImage command. Image enhancements brightness, contrast, saturation, sharpen, blur, invert and greyscale. Images can be rotated, cropped and flipped.

ASP text example.
Drawing, editing and filling shapes.
A text based counter.
A simple captcha system.
Positioning text on an image, using a mouse and Javascript.

Image Merging

Two images can be merged by placing one on top of the other. Different methods allow the second image to go in front of or behind the main image. Images can be taken from disk, from a binary variable or another instance of the csImageFile control. This allows for a wide range of possibilities such as taking an image from a file upload or database or editing both images before merging. Transparency options allow the foreground image to have a single colour transparency (as with a GIF) or an alpha channel (as supported by PNG images).

Merging images in ASP.
Watermarking with alpha transparency.
A counter made from a compound image.
Rubber stamping an image.
Merging images while preserving alpha transparency.
Creating an alpha transparency mask.

Import and Export

Images can be imported and exported from disk, from a variant array binary variable and using the Windows bitmap handle. Most of the commonly used file types are supported, JPG, GIF, BMP, PNG, PSD, PCX, TIF and WBMP, with functionality to export images as PDF. For more advanced PDF functionality we recommend using the PDFBuilderASP component from Ciansoft.

The variant array is used when images are stored directly in database BLOB fields and also by our ASP upload component, csASPUpload. Images can be imported from a file upload and they can be transfered to and from database fields. The binary output is also used in ASP with Response.BinaryWrite to stream an image to the browser.

When importing a file any image in CMYK format is automatically converted to RGB. Embedded ICC Colour Profiles in JPEG and TIFF images are preserved. Supported metadata properties (IPTC, EXIF and XMP) are preserved by default although then can be cleared if it is important to reduce the file size.

Converting between image formats.
Setting the DPI of an image.
Preserving ICC color profiles.

Metadata - IPTC, XMP, EXIF and People Tagging

Comprehensive methods and properties have been included to read and write metadata stored in JPEG and TIFF images. This includes IPTC text stored in both the older IIMV4 and newer XMP formats, EXIF data, XP Summary Data and Microsoft People Tagging. Metadata can be written directly into the JPEG header using the OverwriteMetaData method to avoid the need to recompress an image.

IPTC demo for ASP.
Reading EXIF data.
Writing EXIF data.
The EXIF orientation tag.
Displaying People Tags.
Interactive demo to display EXIF data.
Interactive demo to display IPTC data.

Multi-page TIFFs

csImageFile supports multi-page TIFFs and can extract individual pages or build up a multi-page document from individual images. It supports Group 3 and Group 4 compression (although Group 3 is read only). Pages can be inserted or deleted from existing documents.

Displaying a multi-page TIFF.

Animated GIFs

csImageFile has some support for multi frame GIFs. Individual frames can be extracted and multi frame images can be built up from individual images. There is control over delay times, loop count and disposal method.

Creating an animated GIF.

Quick Links

Download - Download the trial version of csImageFile.

Instruction manual - HTML version.

Instruction manual - PDF version.

Buy - Price details and online purchase of csImageFile.

Upgrade to the latest version.

Classic ASP Examples

List of Examples - classic ASP examples, including component registration and image streaming.

Code samples (ASP)

Simple Resize - Resizing an image to fit a box and for displaying thumbnails from a directory.

Upload to Database and Resize - Using csASPUpload and MS Access.

Upload to File and Resize - Using csASPUpload and saving to disk.

Simple Counter - Simple graphical counter.

IPTC - Read and edit JPEG meta data.

Photo Gallery - Creating a gallery of thumbnails.

Multipage TIFFs - View pages in a multipage TIF.

Form Verification - Creating an image of text to verify user input.

Selecting a rectangle - Using Javascript to select an area on an image.

ASP NET

Using csImageFile with ASP.NET.

Code samples (Cold Fusion)

Using csImageFile with Cold Fusion.

Simple Resize - an example of resizing to fit a box.

IPTC - read and edit JPEG meta data.

Useful Pages

Component Registration - Some more details and a downloadable utility to make the process easier.

Creating a COM+ Application - An ASP component can be added to a COM+ Application in Component Services for better control of permissions or to allow a 32 bit component to run on a 64 bit website.

Displaying ASP error mesages - How to configure IIS to show detailed ASP error messages.

© Chestysoft, 2024.

Cookies

This site uses cookies for functionality, traffic analysis and for targeted advertising. Click the Accept button to accept our Cookie Policy. The Cookie Policy page offers configuration for a reduced set of cookies for this site.