![]() |
|
#1
|
|||
|
|||
Grayscale along a gradientHi there,
I am using visual C++, using visual studio windows forms. I have a bitmap which shows different colours which relate to different temperatures ranging from blue(cold) through green yellow orange and finally red (hottest). How can I make a grayscale function/algorithm to mimick this to grayscale, keeping the linear gradient - so that the greyscale will go from lighter to darker??? The range of grayscales will be important to ensure a reasonably good visual resolution. Any help, ideas? Thanks Yummy (I believe this is the right forum for this post) |
|||
|
#2
|
|||
|
|||
Re: Grayscale along a gradientEvery shade of gray has the same value for Red, Blue, and Green. So, if you had a scale from 0.0 (Black) to 1.0 (White), you could have a function like:
CPP / C++ / C Code:
|
Recent GIDBlog
Install Adobe Flash - Without Administrator Rights by LocalTech
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to get the pixels' value of a bmp image? (Pelles C) | Soundzz | C++ Forum | 51 | 29-Jun-2009 07:53 |
| BMP image on matrix load | nemo | C++ Forum | 21 | 17-Dec-2007 23:04 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The