brightness

How to increase brightness of camera in Android

我们两清 提交于 2019-12-04 10:51:37
How do I change the brightness level of the camera? Steve Using the camera parameters as pointed out by @appleskin, would either of these methods help? setWhiteBalance() or setExposureCompensation() You can pass your camera parameters . Try parameters.set("iso", 400); or whatever int value is supported on your device used following way to increase or decrease brightness ( its for activity so you can used anywhere for camera or activity also), its working fine.so it helping to anyone. call following function in your activity : private void setSeekbar() { seekBar.setMax(255); float

Default CSS filter values for brightness and contrast [duplicate]

让人想犯罪 __ 提交于 2019-12-04 06:03:59
This question already has answers here : Closed 5 years ago . How to Decrease Image Brightness in CSS (11 answers) Recently I've updated Chrome to v.26 and pictures which were displayed using HTML5 canvas were not visible anymore. As I found I had to change to brightness and contrast. How are the values for BC for CSS filters different depending on the browser engine? Default: Brightness: 0; contrast 100: Firefox ? Brightness:100; contrast:100: Chrome ? As I found out it is actually a bug fix for Chrome: https://code.google.com/p/chromium/issues/detail?id=168004 I found this and it will

Clean way to implement gradual fading of brightness in Android?

微笑、不失礼 提交于 2019-12-04 02:33:55
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 Runnable() { public void run() { float currentBright = bright / 100f; window.getAttributes().screenBrightness = currentBright; window.setAttributes(window.getAttributes()); }); } try { sleep(step); } catch (InterruptedException e) { e.printStackTrace(); } } } }.start(); I'm not sure if that's considered good methodology (I considered using ASyncTask, but I can't see the benefits in this case).

Changing Backlight Level, iPhone

这一生的挚爱 提交于 2019-12-03 09:09:20
I searched around for a way to set the backlight level within an app on the iPhone. I found a solution here: http://www.iphonedevsdk.com/forum/29097-post3.html The problem I have is, when I add this to my app I get an error and a warning. My code is as follows: #include "GraphicsServices.h" - (void) viewWillAppear:(BOOL)animated { NSNumber *bl = (NSNumber*) CFPreferencesCopyAppValue(CFSTR("SBBacklightLevel" ), CFSTR("com.apple.springboard")); previousBacklightLevel = [bl floatValue]; //Error here : incompatible types in assignment [bl release]; GSEventSetBacklightLevel(0.5f); // Warning here :

Brightness and Contrast for a canvas image with javascript

烂漫一生 提交于 2019-12-03 08:17:39
问题 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 回答1: There's at least one javascript library I know of which can do this, Pixastic Usage might look like this. Pixastic.process(canvas, 'brightness', { 'brightness': 60, 'contrast': 0.5, 'leaveDOM': true }, function(img) { ctx.drawImage(img, 0, 0); } ); The library is kind of intended to work with images

python — measuring pixel brightness

喜夏-厌秋 提交于 2019-12-03 05:58:57
问题 How can I get a measure for a pixels brightness for a specific pixel in an image? I'm looking for an absolute scale for comparing different pixels' brightness. Thanks 回答1: To get the pixel's RGB value you can use PIL: from PIL import Image from math import sqrt imag = Image.open("yourimage.yourextension") #Convert the image te RGB if it is a .gif for example imag = imag.convert ('RGB') #coordinates of the pixel X,Y = 0,0 #Get RGB pixelRGB = imag.getpixel((X,Y)) R,G,B = pixelRGB Then,

python — measuring pixel brightness

老子叫甜甜 提交于 2019-12-02 19:26:56
How can I get a measure for a pixels brightness for a specific pixel in an image? I'm looking for an absolute scale for comparing different pixels' brightness. Thanks Saulpila To get the pixel's RGB value you can use PIL : from PIL import Image from math import sqrt imag = Image.open("yourimage.yourextension") #Convert the image te RGB if it is a .gif for example imag = imag.convert ('RGB') #coordinates of the pixel X,Y = 0,0 #Get RGB pixelRGB = imag.getpixel((X,Y)) R,G,B = pixelRGB Then, brightness is simply a scale from black to white, witch can be extracted if you average the three RGB

Luminosity from iOS camera

末鹿安然 提交于 2019-12-01 12:08:40
I'm trying to make an application and i have to calculate the brightness of the camera like this application : http://itunes.apple.com/us/app/megaman-luxmeter/id455660266?mt=8 I found this document : http://b2cloud.com.au/tutorial/obtaining-luminosity-from-an-ios-camera But i don't know how to adapt it to the camera directly and not an image. Here is my code : Image = [[UIImagePickerController alloc] init]; Image.delegate = self; Image.sourceType = UIImagePickerControllerCameraCaptureModeVideo; Image.showsCameraControls = NO; [Image setWantsFullScreenLayout:YES]; Image.view.bounds = CGRectMake

Luminosity from iOS camera

僤鯓⒐⒋嵵緔 提交于 2019-12-01 11:15:30
问题 I'm trying to make an application and i have to calculate the brightness of the camera like this application : http://itunes.apple.com/us/app/megaman-luxmeter/id455660266?mt=8 I found this document : http://b2cloud.com.au/tutorial/obtaining-luminosity-from-an-ios-camera But i don't know how to adapt it to the camera directly and not an image. Here is my code : Image = [[UIImagePickerController alloc] init]; Image.delegate = self; Image.sourceType =

How to turn off Auto-Brightness programmatically?

南楼画角 提交于 2019-12-01 07:48:31
问题 I was wondering if there is a method to toggle the "Auto-Brightness" option to the OFF position on iOS devices and if so, what is it? 回答1: Brightness can be adjusted when you are inside the app and it is available inside the UIScreen class - Here's the documentation - http://developer.apple.com/library/ios/#documentation/uikit/reference/UIScreen_Class/Reference/UIScreen.html#//apple_ref/occ/instp/UIScreen/brightness But Apple's official public APIs do not allow an iOS app to access General