home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!utcsri!dgp.toronto.edu!lansd
- Newsgroups: comp.os.ms-windows.programmer.misc
- From: lansd@dgp.toronto.edu (Robert Lansdale)
- Subject: Problem with SetPixel() to a bitmap in 32k color mode
- Message-ID: <1992Aug15.113611.23053@jarvis.csri.toronto.edu>
- Organization: CSRI, University of Toronto
- Distribution: na
- Date: 15 Aug 92 15:36:11 GMT
- Lines: 28
-
-
- I have a small problem: SetPixel() is producing smeared color
- output when it is performed directly onto a bitmap that was created with a
- CreateCompatibleBitmap(). The main device context from which the bitmap
- was made compatible is a 640x480x32k ATI VGA screen. 256-color output is
- fine (palette mode, not true-color mode). Once the bitmap has been written
- I then BitBlt() it to the window's client area (I know the BitBlt() code
- is working fine).
-
- However, if I stuff the pixels into a RGBQUAD structure and
- use SetDIBits() to move the pixels onto the bitmap, then the resulting
- output is fine. Also, doing a SetPixel() directly to the graphics screen
- works fine by itself.
-
- Additionally, I have noticed that the 15-bit (32k color) output
- using SetDIBits() is nicely dithered by the ATI card (no banding: probably
- due to their "CODE" color enhancement feature) but the output has banding
- when using the SetPixel() routine. Any reason for the difference?
-
- Any suggestions would be greatly appreciated.
-
- --> Rob Lansdale
-
- --
- Robert Lansdale - (416) 978-6619 Dynamic Graphics Project
- Internet: lansd@dgp.toronto.edu Computer Systems Research Institute
- UUCP: ..!uunet!dgp.toronto.edu!lansd University of Toronto
- Bitnet: lansd@dgp.utoronto Toronto, Ontario M5S 1A4, CANADA
-