Next Previous Contents

2. What is icoutils

2.1 Concepts

The following concepts are used by the icoutils programs:

icon file

An icon file contains a number of images. Image properties are width, height, number of colors, color RGB data, image data, mask data. An icon file is basicly a set of BMP images. The extension of these files found in Windows 3.0 and later is .ICO.

cursor file

Cursor files are exactly the same as icon files, with the exception that four bytes, for each image, are used to store the cursor hotspot. The extension of cursor files is .CUR.

module

Microsoft Windows executables (.EXE) and dynamicly linked libraries (.DLL) are usually named modules.

32-bit modules (here 32 means size of memory addresses in the file) are used in Windows 9x, NT 4 and later. 16-bit modules are found in Windows 3.x.

resource

A resource is a piece of data embedded into a Windows module.

In 32-bit modules, resources are arranged by type, name and language (one directory tree for each type, and name). In 16-bit modules, resources are arranged by type and name only. Types and names may be either an integer or a string.

There are several types of resources; most of them are listed in the Resource Types section.

resource script

Resource scripts are simple files used by extresso to extract resources from listed files. (Resource scripts are specific to extresso.)

The format of resource scripts is described in the Resource Scripts section.

2.2 Components

The icoutils programs consists of three programs; icotool, wrestool and extresso. They are described in separate sections.

2.3 Resource Types

The wrestool program recognizes the resource types list below. The ids of these resources are always numeric and not strings.

Not all resource types are supported by wrestool. However, if you know the format of the data in the resource, you can use the "--raw" option to extract it. (This way you can extract resources of any type.)

cursor (1)

A single cursor bitmap image. Read as part of group_cursor resources.

bitmap (2)

A bitmap image. (I need to do more research on this.)

icon (3)

A single icon bitmap image. Read as part of group_icon resources. This resource is similar to cursor resource; cursors contain four additional bytes of hotspot coordinates.

menu (4)

Resources for menus (in popup and menubars). Currently, wrestool does not support this resource type.

dialog (5)

Definitions (widgets with locations) for dialog boxes. Currently, wrestool does not support this resource type.

string (6)

The string table resource, containing a number of unicode strings. Currently, wrestool does not support this resource type.

fontdir (7)

The font directory, containing information on a number of font resources (8). Windows non-TTF font (.FON) files are actually libraries with resources in them. Currently, wrestool does not support this resource type.

font (8)

A single font - the contents of a .FNT file. Read as part of fontdir resources. Currently, wrestool does not support this resource type.

accelerator (9)

Keyboard accelerator tables. Currently, wrestool does not support this resource type.

rcdata (10)

Arbitrary resource data, user-defined. There are no restrictions to the format of these resources.

messagelist (11)

Not supported.

group_cursor (12)

A set of cursors. With a few modifications (and with cursor resources), this resource can be extracted as a .CUR file.

group_icon (14)

A set of icons. With a few modifications (and with icons resources), this resource can be extracted as a .ICO file.

version (16)

Version information, stored as binary data. Could be extracted without modifications, but the data is of probably little use. Currently, wrestool does not support this resource type.

dlginclude (17)

Not supported.

plugplay (19)

Not supported.

vxd (20)

Not supported.

anicursor (21)

Animated cursors. Currently, wrestool does not support animated cursor or icons, nor does icotool.

aniicon (22)

Animated icons. I have only seen these in Windows 3.x. Currently, wrestool does not support animated cursor or icons, nor does icotool.


Next Previous Contents