- Resize and scale images. Create thumbnail images from an ASP script.
- Allows input as a file from the server or as binary data from a database.
- Accepts input direct from the csASPUpload component.
- Save 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.
- Uses JPG, GIF, BMP, PNG and TIFF image formats and can convert between them.
- Available as 32 bit or 64 bit.
This is a cut-down version of our popular csImageFile component, intended to provide useful functionality for a lower cost.
It retains the image resize methods, the image merging and the alpha transparency options. It also supports writing text onto images.
It does not support meta data, drawing of lines and shapes or multipage/multiframe images. It does not support the editing of colour palettes.
Image Resizing
csImageLite 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 upload and resize example, saving to file.
ASP image upload and resize example, saving to database.
Image Editing
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. Images can be rotated, cropped and flipped, have the colours inverted or converted to greyscale.
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 csImageLite 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.
Rubber stamping an image.
Import and Export
Images can be imported and exported from disk, from a variant array binary variable and using the Windows bitmap handle. Many of the commonly used file types are supported, JPG, GIF, BMP, PNG and TIF.
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.
Converting between image formats.
Setting the DPI of an image.