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.

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.

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.

Listing of classic ASP examples, including component registration and image streaming.
Using csImageFile with ASP.NET.
Using csImageFile with Cold Fusion.

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.
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.

All the methods and properties are fully described in the Online Manual ( HTML or PDF ).

Some downloadable examples of using csImageFile:

Existing users can upgrade to the latest version - Click for details.