| 1 |
|
| 2 |
____ _ _ _ _ ___ __ _ |
| 3 |
|_ | \/ | | | | |\ | |
| 4 |
| | _/\_ | |__ |_| | \| |
| 5 |
|
| 6 |
|
| 7 |
by Elias Pschernig |
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
The wfixicon utility converts Allegro images to Windows icons, that |
| 12 |
is it lets you convert one or several images in any format supported by |
| 13 |
Allegro into icons suitable to be included in your Windows executable. |
| 14 |
|
| 15 |
It has two main execution modes: you can either directly pass it image files |
| 16 |
from your hard drive or bitmaps and RLE sprites from an Allegro datafile. |
| 17 |
The only difference between the two modes is for 8-bit images: in the former |
| 18 |
case, wfixicon will automatically extract the palette from the image file, |
| 19 |
whereas in the latter case you will have to explicitly provide a palette |
| 20 |
object from the datafile. |
| 21 |
|
| 22 |
The general syntax for the first mode is as follows: |
| 23 |
|
| 24 |
'wfixicon icon [options] bitmap [bitmap...]' |
| 25 |
|
| 26 |
where 'icon' is the icon file to be generated (usually with the standard |
| 27 |
.ico extension) and each 'bitmap' is a source bitmaps to be processed. |
| 28 |
|
| 29 |
The general syntax for the second mode is as follows: |
| 30 |
|
| 31 |
'wfixicon icon [options] -d datafile object [palette] [object...]' |
| 32 |
|
| 33 |
where 'icon' is the icon file to be generated (see above), 'datafile' is the |
| 34 |
source from which all objects are taken, and each 'object' is a bitmap |
| 35 |
or RLE sprite (DAT_BITMAP or DAT_RLE) within the datafile, specified by |
| 36 |
name. |
| 37 |
|
| 38 |
If you have used any 8-bit images, you must also specify a palette. For |
| 39 |
each palette object you include on the command line, any images between |
| 40 |
it and the last palette will be given that palette. For example: |
| 41 |
|
| 42 |
|
| 43 |
'wfixicon i.ico -d d.dat icon icon2 pal1 tool tool2 pal2' |
| 44 |
|
| 45 |
will give the icons called 'icon' and 'icon2' the palette 'pal1', and |
| 46 |
the icons 'tool' and 'tool2' will be given 'pal2'. |
| 47 |
|
| 48 |
The wfixicon utility accepts the following options: |
| 49 |
|
| 50 |
'-r' |
| 51 |
Outputs a resource source file (.rc) suited to the icon, in addition |
| 52 |
to the icon itself. When compiled and linked to an Allegro Windows |
| 53 |
executable, this file attachs the icon to the executable and makes it |
| 54 |
the default icon, displayed in the window caption and the task list. |
| 55 |
|
| 56 |
'-ro' |
| 57 |
Same as '-r' but additionally call the resource compiler on the .rc |
| 58 |
file, making it produce an object file ready to be linked to an |
| 59 |
Allegro Windows executable, with the same effects as described above. |
| 60 |
|
| 61 |
|
| 62 |
An example of use is provided in the Allegro distribution: the demo program |
| 63 |
gets a nice little icon (or an ugly one, it's up to you...) extracted from |
| 64 |
its datafile (with the Borland C++ compiler you need to type 'make fixdemo' |
| 65 |
from the main directory once you have properly installed the library). |