home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / mswindo / programm / misc / 1341 < prev    next >
Encoding:
Internet Message Format  |  1992-08-15  |  1.6 KB

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