Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert bitmap to grayscale

Status
Not open for further replies.

imagenetics

Programmer
Dec 8, 2003
66
0
0
PL
A bitmap in TImage. How to smoothly covert this bitmap to grayscale to achive the same effect like in Windows XP when you call a Shutdown system/Logoff user dialog?
 
so keeping explanation simple im guessing your fading into greyscale as i dont use xp so therefore dont know what your on about

grayscale
r= r+g+b/3
g= r+g+b/3
b= r+g+b/3

repeat until r=g=b

if (r>g) {r--;g++;}
if (b>g) {b--;g++;}
if (r<g) {r++;g--;}
if (b<g) {b++;g--;}


obviously r g b are the pixel intensites for the bitmap.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top