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