Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Any way to programmatically change the screen brightness/contrast?

Any way to programmatically change the screen brightness/contrast?
Thread Tools
oVeRmInD911
Senior User
Join Date: Apr 2001
Location: Bolingbrook, IL, USA
Status: Offline
Reply With Quote
Aug 4, 2003, 10:15 PM
 
I'm thinking of making a program that will change the screen brightness and contrast with the time of the day. That way, you can make it so at night it will be less bright and during the day it will be more bright. Is there any way to change it, or will I have to manually change them every day?
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Aug 5, 2003, 03:58 AM
 
Originally posted by oVeRmInD911:
I'm thinking of making a program that will change the screen brightness and contrast with the time of the day. That way, you can make it so at night it will be less bright and during the day it will be more bright. Is there any way to change it, or will I have to manually change them every day?
I'm not sure how much skill you have in what areas, but CoreGraphics has functions for this.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
arekkusu
Mac Enthusiast
Join Date: Jul 2002
Status: Offline
Reply With Quote
Aug 5, 2003, 03:01 PM
 
Specifically, CGSetDisplayTransferByTable().

see the Apple sample code:
http://developer.apple.com/samplecod...2D/CGGamma.htm
     
Rickster
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status: Offline
Reply With Quote
Aug 6, 2003, 02:06 AM
 
That actually changes the picture gamma curve... I think Overmind is asking about how to control the brightness of the display's backlight lamp, doing the same thing as the Brightness slider in the Display pane of System Prefs.

As for how to do the latter, I have no idea... Never had a need to look for myself. But you might still find it by poking about in CoreGraphics headers... or you may need to look around at the IOKit level, since that's a hardware thing.
Rick Roe
icons.cx | weblog
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 12:33 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,