Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SetDeviceGammaRamp() fails at < 50% brightness under XP

33 views
Skip to first unread message

Mike D

unread,
Jan 27, 2003, 12:07:59 PM1/27/03
to
Hi all,

I'm trying to use SetDeviceGammaRamp() to do a gamma fade of the screen
for a slide show. The idea is to fade to black, switch images, then
fade back up.

My code uses GetDeviceGammaRamp(GetDC(NULL),ramp) to get the current
settings and put them aside.

Then I multiply each value in the ramp by a number between 0 and 1 into
a new table, and then use SetDeviceGammaRamp(GetDC(NULL),newRamp) to set
the values.

I then vary the percent from 1.0 to 0.0 over time.

Under Windows 98 this works fine.

Under windows XP, on two different test systems (A brand new DELL
desktop and a Sony VAIO laptop) the gamma fade fails when percent <
0.50, and SetDeviceGammaRamp() returns FALSE.

There are some notes in the Microsoft documentation that
SetDeviceGammaRamp() will fail if it decides your gamma tables are "too
complex". But of course there is no more documentation. I've tried
some hacks (such as making sure I left a 0xFF value in each R,G,B color)
but no luck.

Any ideas? Are there better newsgroup(s) to post this to? (I'm new
here)

Thanks!
--
To send email, remove the invalid and nospams.

0 new messages