Full Name |
ICO (Windows icon) |
Format ID |
ImGearFormats.ICO |
File Extension(s) |
*.ico |
Data Type |
Raster Image |
Data Encoding |
Binary |
Multi-Page Support |
Yes |
Alpha Channel Support |
Single alpha channel for read/write (see Comments). |
IG Metadata Update Support |
Page |
IG Platforms Support |
WIN32, WIN64, Unix, Unix64, .NET, .NET64, MAC |
ImageGear Supported Versions
- Windows 3.1
- Windows NT/95
ImageGear Supported Features
- IGFilterFormatFlags.DETECTSUPPORT - autodetection
- IGFilterFormatFlags.MPAGEREADPSUPPORT - multi-page file reading
- IGFilterFormatFlags.PAGEINSERTSUPPORT - single-page file writing
- IGFilterFormatFlags.PAGEREADSUPPORT - single page file reading
ImageGear Read Support
- ImGearCompressions.NONE:
- Indexed + Extra: 1+1, 4+1, 8+1 bpp;
- RGB + Alpha: 32 bpp
- ImGearCompressions.RLE:
- Indexed + Extra: 4+1, 8+1 bpp
ImageGear Write Support
- ImGearCompressions.NONE:
- Indexed + Extra: 1+1, 4+1, 8+1 bpp;
- RGB + Alpha: 32 bpp
ImageGear Filter Control Parameters
Filter Control Parameter |
Type |
Default Value |
Available Values |
Description |
ReadAsRGBA |
bool |
false |
true, false |
If true, ImageGear reads ICO format as RGBA (RGB with alpha channel). |
Comments
More than one representation of the icon bitmap is stored in order to offer a choice of icons; the version most compatible to the output device is used. Support for read-write transparency masks has been added to the ICO filter. Transparency masks are placed into an alpha channel when the image is created. These masks can subsequently be set and applied to the main image.
The structure of an ICO file consists of four data sections: the header, the Resource Descriptor, and two representations of the image data per each icon (the color bitmap and the 1-bit masking bitmap).
The header identifies the file as an ICO and stores the number of icon images that are stored in the file.
The Resource Descriptor stores the image width and height, the number of colors used, and the offset from the beginning of the file to the image data.
The 1-bit masking bitmap defines the transparent portion of the bitmap.
ReadAsRGBA control parameter determines how ImageGear reads the 1-bit AND masks. If ReadAsRGBA is False, ImageGear reads AND mask into "Extra" channel. This mode preserves unchanged pixel values from the file. However, in this mode ImageGear displays only the XOR mask and ignores AND mask (Extra channel) during display, i.e., display is not transparent. If ReadAsRGBA is TRUE, ImageGear reads ICO files as 32 bpp RGB + Alpha. This allows transparent display.
References Used
Brown, C. Wayne, and Barry J. Shepherd. Graphics File Formats: Reference and Guide. Greenwich, CT.: Manning Publications, 1992.