am42+@andrew.cmu.edu (Alexander Paul Morris) (01/31/91)
I have some 24-bit true color images that I'd like to display on a 256 color vga adapter. But I can't seem to translate the appropriate colors. First of all, the vga palette is on 18 bits, so color resolution is already lost there. But if all I were doing was going from 24-bit to 18-bit rgb, it would not really be a problem. But going to 256 colors (8-bit), I don't know which of the 18-bit palette to place into the 256 color positions. Has anyone done any work with this? Does anyone have any idea on how to get a good palette from this? I know it can be done because PicLab 1.82 did it (though it took some time), and I used Piclab to convert the 3 raw color palettes into a 24-bit Targa file and displayed it with VPIC and instantly the picture came up with the correct palette. As far as I know, targa files don't hold a palette, so VPIC must have some great formula or instant transform to do the conversion. Please help me figure this out, or find that formula, or something! Thanks in advance. Alexander Morris "People die, things change... Carnegie Mellon It's sad." Alexander Morris "People die, things change... Carnegie Mellon It's sad."
dsmith@hplabsb.HP.COM (David Smith) (02/02/91)
In article <8bduSJW00WBMQ4js58@andrew.cmu.edu> am42+@andrew.cmu.edu (Alexander Paul Morris) writes: >I have some 24-bit true color images that I'd like to display on a 256 >color vga adapter. >I don't know which of the 18-bit palette to place into the 256 color >positions. One way is to use 3 bits each of red and green, and 2 bits of blue. Another is to use 7 levels of green, 6 of red, and 5 of blue. Then you halftone the colors onto the screen using error diffusion or dither. -- David R. Smith, HP Labs | "There are two kinds of truth. dsmith@hplabs.hp.com | There are real truths, (415) 857-7898 | and there are made-up truths." | - Marion Barry (USN&WR 12/31/90 p18)