Home »
Public Forums »
archive »
Converting 24bit images to 8 bit
Converting 24bit images to 8 bit [message #938] |
Wed, 10 March 1993 06:08 |
gdc11
Messages: 2 Registered: February 1993
|
Junior Member |
|
|
I have an application using PV-wave in which I'm using ray-tracing to render
some objects which intersect. I am trying to produce colour images and therefore
render each red, green and blue component of the image separately. The problem
comes in trying to reduce the resulting 24bit image to a 8bit image so that I
can display it.
PV-wave includes a general purpose routine to set up a 8bit colourmap for
use with 24bit images. However, it does this by restricting the no. of red
and green shades to 8 (2^3) and blue shades to 4 (2^2). It doesn't scan the image
to see which colours are actually used and the resulting image is somewhat
disappointing.
Can anyone help me out with a better algorithm to convert the 24bit images to
8bit? The obvious first step is to scan the red, green and blue images to
actually see what colours are required. This will undoubtedly produce more than
256 colours and the not-so-obvious next step is how to reduce the no. of colours
required.
If anyone can help out with some algorithms or point me in the direction of
some reference material I would be extremely grateful.
Glenn Carver (glenn@atm.ch.cam.ac.uk or gdc11@cus.cam.ac.uk)
Centre for Atmospheric Science
Cambridge University
UK.
|
|
|
Current Time: Sat Oct 11 04:55:34 PDT 2025
Total time taken to generate the page: 2.48020 seconds