File Formats: Icons and Cursors (ICO and CUR)

LEADTOOLS reads and writes Windows Icon and Cursor files. LEADTOOLS is not designed as an icon editor, but this file support lets you create a bitmap from an icon or cursor, or create an icon or cursor from a bitmap. The library (DLL) to support these formats is the same as for BMP files.

Windows Icon (ICO). This is a multipage file format for storing one or more Windows icons. The background color when you read these images is always black. The size when you write these images can be no larger than 255-by-255 pixels. (Neither the width nor height can be greater than 255.) You can read and write single-page or multipage files. You can read and write 16-bit as well.

Windows PNG Icon (ICO). This is a multipage file format with PNG compression scheme, which reduces the size and maintains the quality of an image. It is a new icon format that came with Microsoft Windows Vista. You can use size up to 256x256 pixels. It also supports 32 bits with alpha channel.

Windows Cursor (CUR). This is a file format for storing Windows cursors (mouse pointers). LEADTOOLS loads or saves transparency information using the region. The size when you write these images should be exactly 32-by-32 pixels. LEAD supports loading and saving multipage files in this format.

NOTE: When you save a bitmap with a region as a CUR or ICO file, the pixels inside the region are considered to belong to the icon/cursor data. The pixels outside the region are considered transparent. If you save a bitmap without a region as a CUR or ICO file, the whole bitmap will be considered icon/cursor data. In this case, you will get a square icon or cursor. Note, however, that the ability to save a region inside a TIFF file must be unlocked. This requires a Document Imaging Toolkit or Document/Medical toolkit.

The file constants associated with these file formats are:

Constant Read Support Write Support Description
WinIco 1, 4, 8, 24 BPP 1, 4, 8, 24 BPP Windows Icon.
PngIco 1, 4, 8, 24, 32 BPP 1, 4, 8, 24, 32 BPP Windows PNG Icon.
WinCur 1, 4, 8, 24 BPP 1, 4, 8, 24 BPP Windows Cursor.

Required DLL: Leadtools.Codecs.Bmp.Dll. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application .

Related Formats: ANI - Windows Animated Cursor, CLP - Microsoft Windows Clipboard Format.

Platform Support

Extension Module Value Win32 Win64 Net32 Net64 Linux Android Apple UWP MimeType Friendly Name
WinIco ICO 91 Windows Icon - ICO
PngIco BMP 321 image/bmp ICO - Windows Icon with PNG Compression
WinCur CUR 92 Windows Cursor - CUR

For a complete list for supported file formats, see Summary of All Supported File Formats.

For details of the file formats supported across products and platforms, refer to File Format Comparison Chart.

Help Version 20.0.2020.4.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Imaging, Medical, and Document