Solved

Changing Palette Values to GrayScale

Posted on 1999-01-06
1
246 Views
Last Modified: 2010-04-04
I can´t figure out how to change the palette of my application to support 64 different colors in grayscale, ranging from white(0) to black(63).
0
Comment
Question by:skaba
1 Comment
 

Accepted Solution

by:
ptiemann2 earned 100 total points
ID: 1354998
This question is _very_ general..

1) do you mean how to convert a RGB value to 6 bit greyscale?

or

2) do you mean to have a palette of 64 grey values displayed correctly in Windows (which is a little difficult if you have a 256 colors-only environment.. you need to handle a few wm_paletteXXX messages)

Let me know and I'll be able to help then.

The conversion (r,g,b) --> grey is a sum LIKE this:

grey = r * 0.33 + g * 0.4 + b * 0.27

I don't have the exact values at hand.. it has to do with the fact that the human eye is more sensitive to blue than to red.
I can look it up for you if need this.

Let me know more before you grade this answer..
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now