Questions tagged [brightness]

An attribute of visual perception in which a source appears to be radiating or reflecting light.

Brightness is an attribute of visual perception in which a source appears to be radiating or reflecting light. In other words, brightness is the perception elicited by the luminance of a visual target. This is a subjective attribute/property of an object being observed.

478 questions
15
votes
4 answers

Can't apply system screen brightness programmatically in Android

I'm using the following to set the system auto brightness mode and level: android.provider.Settings.System.putInt(y.getContentResolver(),Settings.System.SCREEN_BRIGHTNESS_MODE, 0); …
user496854
  • 6,461
  • 10
  • 47
  • 84
15
votes
2 answers

Is iphone simulator's brightness adjustable?

i tried to use the most of the correct answers suggested by the users to adjust the brightness of the iphone (ie [[UIScreen mainScreen]setBrightness:0.0];) but the simulator didn't change its brightness. Is iphone simulator's brightness adjustable?…
iosMentalist
  • 3,066
  • 1
  • 30
  • 40
14
votes
2 answers

Normalize histogram (brightness and contrast) of a set of images using Python Image Library (PIL)

I have a script which uses Google Maps API to download a sequence of equal-sized square satellite images and generates a PDF. The images need to be rotated beforehand, and I already do so using PIL. I noticed that, due to different light and terrain…
heltonbiker
  • 26,657
  • 28
  • 137
  • 252
14
votes
6 answers

How to use JavaScript to measure how bright a users monitor is?

I've noticed that the brightness of computer monitors drastically varies between computers. As such, this changes the look of web pages greatly. Is there a way to use JavaScript to automatically detect how bright (or dark) a users monitor is so that…
HankV
  • 157
  • 1
  • 4
12
votes
3 answers

Unable to restore brightness on application exit

I have a feature in my app (a metronome app for musicians) to dim the screen in order to save on battery life. To set the brightness, I am using: [UIScreen mainScreen].brightness = 0.1; I am saving the original brightness on app start up in…
TheTwoNotes
  • 453
  • 3
  • 15
12
votes
3 answers

How do I detect the screen brightness range on android?

I'm using the following code to set the screen brightness, which works fine on most phones: protected fun setBrightness(value: Float) { //Set the system brightness using the brightness variable value …
Grzegorz Adam Hankiewicz
  • 7,349
  • 1
  • 36
  • 78
12
votes
4 answers

Brightness and Contrast for a canvas image with javascript

I have an image in a tag var img = new Image(); ctx.drawImage(img,0,0,img.width,img.height); ecc... How is possible to change the Brightness and Contrast of this image with javascript? Tnx
Claudio
  • 1,144
  • 3
  • 11
  • 21
12
votes
5 answers

How to set brightness through ADB on nexus 7

I found some info on the web: echo 1 /sys/devices/platform/flashlight.0/leds/flashlight/brightness But on my Nexus 7 (flashed an AOSP), I couldn't find that directory. Any idea about which file should I write to? Is this doable? After ls…
JackWM
  • 10,085
  • 22
  • 65
  • 92
12
votes
1 answer

Image conversion to Grayscale using ImageMagick is very dark

I converted a bunch of "normal" JPG photos via convert infile -colorspace Gray outfile to monochrome. However the result is for all images very dark. Here a sample conversion: original photo and converted monochrome image. Is there a better way to…
halloleo
  • 9,216
  • 13
  • 64
  • 122
11
votes
2 answers

Clean way to implement gradual fading of brightness in Android?

At the moment I have code to fade brightness adjustments which looks something like this: new Thread() { public void run() { for (int i = initial; i < target; i++) { final int bright = i; handle.post(new…
Glitch
  • 2,785
  • 1
  • 27
  • 50
11
votes
1 answer

Determining Image Luminance/Brightness

My iphone application captures the realtime data from camera using AVFoundation's AVCaptureSession. I'm able to access that data in it's delegate method in runtime and create an image out of it. It can be CGImage, UIImage or just raw data…
krafter
  • 1,425
  • 1
  • 15
  • 28
11
votes
4 answers

How to change the brightness of an Image

My Question: I want to be able to change the brightness of a resource image and have three instances of it as ImageIcons. One at 50% brightness (so darker), another at 75% brightness (a little brighter), and finally another at 100% brightness (the…
kentcdodds
  • 27,113
  • 32
  • 108
  • 187
10
votes
4 answers

IOS5 setBrightness didn't work with applicationWillResignActive

I use [[UIScreen mainScreen]setBrightness: ] (in sdk 5.0) to change the system background light in my app. The following steps work with my app Active the app, get the system brightness as default, then save as sysBright. Change the brightness with…
phnessu4
  • 131
  • 1
  • 8
10
votes
5 answers

Android: detect brightness (amount of light) in phone's surroundings using the camera?

The following applies to the Android operating system. I am trying to estimate how dark (or light) it is in the room where the phone is located using the camera. The idea is that the camera can return a certain brightness level, which I can use to…
Tom
  • 8,536
  • 31
  • 133
  • 232
10
votes
5 answers

What API call would I use to change brightness of laptop (.NET)?

I have Windows Server 2008 installed on a Sony laptop and the brightness control doesn't work. I'd like to write a program to allow me to change it. Currently what I have to do is open the Power control panel, click advanced settings, and fight…
Simon_Weaver
  • 140,023
  • 84
  • 646
  • 689
1
2
3
31 32