Article View: comp.os.ms-windows.programmer.misc
Article #2693Re: Disp 24bpp on 8bpp system?
From: Rolf Berteig
Date: Mon, 11 Jan 1993 19:18
Date: Mon, 11 Jan 1993 19:18
16 lines
1384 bytes
1384 bytes
> Is there anyway to display a 24bpp DIB on a 256 color SVGA without > implementing the code for color quantization? I wrote some code to > convert 24bpp images into 8bpp DIBs, but it takes around 10 seconds > for a 512x512 DIB, and I just wonder if there is a better way. A quick way to do this with results better than bliting (getting the 20 system colors) but with quality still lacking is to create a standard 256 color pallet and an inverse pallet (with say 2^5 entries). To display an image, for every pixel you take the 8 bits for red,green,blue and shift right 3 bits (now you have 15 bit color) and use this number as an index into your inverse color map. Your inverse color map then gives the closest fit to your standard pallet. Now you are ready to blit your device dependent 8 bits per pixel bit map. Rolf Berteig rberteig@u.washington.edu
Technical Details
Message-ID:
<1ish70INNco6@shelley.u.washington.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!ogicse!news.u.washington.edu!shelley.u.washington.edu!rberteigReferences:
<C0K4nM.14B@news.cso.uiuc.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!news.u.washington.edu!shelley.u.washington.edu!rberteig From: rberteig@shelley.u.washington.edu (Rolf Berteig) Newsgroups: comp.os.ms-windows.programmer.misc Subject: Re: Disp 24bpp on 8bpp system? Message-ID: <1ish70INNco6@shelley.u.washington.edu> Date: 11 Jan 93 19:18:56 GMT Article-I.D.: shelley.1ish70INNco6 References: <C0K4nM.14B@news.cso.uiuc.edu> Organization: University of Washington, Seattle Lines: 16 NNTP-Posting-Host: shelley.u.washington.edu