From: Dustbin on


Anyone know where I can get an accurate and
complete well-commented outline of the Windows
Icon File structure including the details of the
header?

Preferably; a ready-made struct. (being lazy)

TIA

D.
From: James Brown on
"Dustbin" <dustbin_address(a)blueyonder.co.uk> wrote in message
news:Z6Hch.50623$qd7.50534(a)fe1.news.blueyonder.co.uk...
>
>
> Anyone know where I can get an accurate and complete well-commented
> outline of the Windows Icon File structure including the details of the
> header?
>
> Preferably; a ready-made struct. (being lazy)
>
> TIA
>
> D.

www.wotsit.org has the .ico file spec.

I also have an article on my site (www.catch22.net/tuts/sysimg.asp) - the C
sourcecode download shows how to write out an ICO file from an array of
HICONs

--
James Brown
Microsoft MVP - Windows SDK
www.catch22.net
Free Win32 Tutorials and Sourcecode


From: mcheu on
On Sun, 03 Dec 2006 21:14:33 GMT, Dustbin
<dustbin_address(a)blueyonder.co.uk> wrote:

>
>
>Anyone know where I can get an accurate and
>complete well-commented outline of the Windows
>Icon File structure including the details of the
>header?
>
>Preferably; a ready-made struct. (being lazy)
>
>TIA
>
>D.

One of the best kept secrets of windows (mostly because a lot of
people don't believe you when you tell them) is that the icon files
are just Windows BMP files with the extension changed to ICO. The
only things special about them are the limits on the size and the
number of colours you can use. Here's one site that covers the
structure:

http://local.wasp.uwa.edu.au/~pbourke/dataformats/bmp/


---------------------------------------------
Thanks.

MCheu
From: henri on

"Dustbin" <dustbin_address(a)blueyonder.co.uk> wrote in message
news:Z6Hch.50623$qd7.50534(a)fe1.news.blueyonder.co.uk...
>
>
> Anyone know where I can get an accurate and complete well-commented
> outline of the Windows Icon File structure including the details of the
> header?
>
> Preferably; a ready-made struct. (being lazy)

The only valuable information is always on MSDN :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwui/html/msdn_icons.asp


From: Lucian Wischik on
mcheu <mpcheu(a)yahoo.com> wrote:
>One of the best kept secrets of windows (mostly because a lot of
>people don't believe you when you tell them) is that the icon files
>are just Windows BMP files with the extension changed to ICO.

I don't believe you.

A bitmap has only a single size and bitdepth.

But a .ico file can contain multiple images, each of different size
and bitdepth.

How would this be possible, if what you say is true?

In any case, the MSDN documentation flat out contradicts you:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwui/html/msdn_icons.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_62uq.asp



(What you might have observed is that some applications will work when
you give them a .bmp file instead of the .ico file that they normally
expect.)

--
Lucian