home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.ms.programmer
- Path: sparky!uunet!sun-barr!cs.utexas.edu!wotan.compaq.com!twisto.eng.hou.compaq.com!sword.eng.hou.compaq.com!mccreary
- From: mccreary@sword.eng.hou.compaq.com (Ed McCreary)
- Subject: Re: Diplaying BMP files under Windows 3.x
- Message-ID: <1992Jul21.180439.12547@twisto.eng.hou.compaq.com>
- Sender: news@twisto.eng.hou.compaq.com (Netnews Account)
- Organization: Compaq Computer Corp.
- References: <1682BEB88.SSCHEMA@ibm.gwdg.de>
- Date: Tue, 21 Jul 1992 18:04:39 GMT
- Lines: 23
-
- In article <1682BEB88.SSCHEMA@ibm.gwdg.de> SSCHEMA@ibm.gwdg.de (Stefan Schemat) writes:
- >Does anybody knows how to load and display a BMP file with 256
- >colors under Windows 3.x?
- >First we have tried to display that bitmap with the GDI-command
- >"BitBlt()" after including it in the program's ressources. It
- >appeared very fast, but only with a few colors.
- >Then we loaded and displayed it pixel by pixel with "SetPixel()".
- >This method shows all colors, but it is veeeeeery sloooooow.
- >Ciao Stefan
- >sschema@ibm.gwdg.de
-
- I assume you have a video card capable of suporting 256 colors. If so,
- you need to create a logical palette based upon the colors needed in the
- image, select it into the device context and realize it before displaying.
- If your using the SDK, there's a section on logical palettes in one
- of the volumes. It's the programmer's guide I believe.
-
- Remember to realized the palette just before creating the bitmap also.
-
- --
- McCreary@sword.eng.hou.compaq.com Computers are like Old Testament gods;
- Me? Speak for Compaq? Yeah, right. lots of rules and no mercy.
- "By this time my lungs were aching for air..." Joseph Campbell
-