home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.os.ms-windows.programmer.misc:1799 comp.os.ms-windows.programmer.tools:941 comp.os.ms-windows.programmer.win32:930
- Newsgroups: comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.tools,comp.os.ms-windows.programmer.win32
- Path: sparky!uunet!usc!sdd.hp.com!uakari.primate.wisc.edu!usenet.coe.montana.edu!news.u.washington.edu!tad
- From: tad@wrq.com (Tad Marshall)
- Subject: Re: How to change color of a .bmp file upon loading
- Message-ID: <1992Sep12.160549.23121@u.washington.edu>
- Keywords: Change color of a bitmap file
- Sender: news@u.washington.edu (USENET News System)
- Organization: Walker Richer & Quinn, Inc., Seattle, WA
- References: <1992Sep12.051058.16495@nuscc.nus.sg>
- Distribution: na
- Date: Sat, 12 Sep 1992 16:05:49 GMT
- Lines: 14
-
- In article <1992Sep12.051058.16495@nuscc.nus.sg> shah@cherry.NoSubdomain.NoDomain (shahrin abdullah) writes:
- >I would like to know whether is there a function in the SDK which allows me
- >to change the color of a bitmap after loading.
-
- A .BMP file is a device independent bitmap (DIB) with a BITMAPFILEHEADER at
- its start. This header is followed by some bitmap parameters, a palette,
- and the actual bitmap bits. It's all quite well documented -- in the win31
- sdk, look in volume 3 on pages 236-241 under BITMAPFILEHEADER, BITMAPINFO
- and BITMAPINFOHEADER. To change the colors in a bitmap, load the DIB into
- memory, modify or copy the header, palette and/or bitmap bits as you wish
- and then use SetDIBits, SetDIBitsToDevice or StretchDIBits to display the
- resulting DIB.
-
- Tad Marshall
-