🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #16565

Re:[SOLVED] Resource file format for RT_BITMAP

#16565
From: Buster
Date: Wed, 07 May 2003 13:29
34 lines
2367 bytes
> Hi,
>
> May be it is a little outdated information but it seems
> explain BMP resource:
>
> http://support.microsoft.com/default.aspx?scid=kb%3ben-us%3b67883
>
> Vladimir.

Thanks Vlad. Your link contained the very useful
"NOTE: The BITMAPFILEHEADER structure is NOT present in the packed
DIB; however, it is present in a DIB read from disk".

Combining this with (from "Bitmap Storage" in the Platform SDK docs:
not in the index, and ranked 20th in a search for "bitmap storage"):
"Bitmaps should be saved in a file that uses the established bitmap
file format and assigned a name with the three-character .bmp
extension. The established bitmap file format consists of a
BITMAPFILEHEADER structure followed by a BITMAPINFOHEADER,
BITMAPV4HEADER, or BITMAPV5HEADER structure. An array of RGBQUAD
structures (also called a color table) follows the bitmap information
header structure. The color table is followed by a second array of
indexes into the color table (the actual bitmap data)."

and (for example, from the description of the lbHatch field in the
LOGPALLETE struct)

"A packed DIB consists of a BITMAPINFO structure immediately followed
by the array of bytes that define the pixels of the bitmap.",

as soon as I guessed that an RT_BITMAP resource is just a packed DIB I
was away. Literally hours of fun, and all thanks to MS!

Buster
Technical Details
Message-ID: <3eb90a03@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3eb863b6@newsgroups.borland.com> <3eb8b8a9$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,a0b87d58144ccc12
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-05-07 06:36:04 PST
From: "Buster" <rcopley@ukonline.co.uk>
Newsgroups: borland.public.cppbuilder.nativeapi
References:  <3eb863b6@newsgroups.borland.com> <3eb8b8a9$1@newsgroups.borland.com>
Subject: Re:[SOLVED] Resource file format for RT_BITMAP
Date: Wed, 7 May 2003 14:29:36 +0100
Lines: 36
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 81.77.157.81
Message-ID: <3eb90a03@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1052314115 81.77.157.81 (7 May 2003 06:28:35 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail