javax.microedition.amms.control.imageeffect
Interface ImageTonalityControl

All Superinterfaces:
EffectControl, Control

public interface ImageTonalityControl
extends EffectControl

ImageTonalityControl is an effect that can be used to set various image settings such as brightness, contrast and gamma.

Setting of the brightness, contrast and gamma can be done by setting to an absolute value between 0 and 100 or using relative setting where the level is set to PREVIOUS or NEXT level or automatic setting where the level is set to AUTO. The number of supported levels can be queried by getBrightnessLevels, getContrastLevels or getGammaLevels methods.

Since:
BlackBerry API 5.0.0

Field Summary
static int AUTO
          Automatic setting.
static int NEXT
          Moves the setting to the next supported level.
static int PREVIOUS
          Moves the setting to the previous supported level.
 
Fields inherited from interface javax.microedition.amms.control.EffectControl
SCOPE_LIVE_AND_RECORD, SCOPE_LIVE_ONLY, SCOPE_RECORD_ONLY
 
Method Summary
 int getBrightness()
           
 int getBrightnessLevels()
           
 int getContrast()
           
 int getContrastLevels()
           
 int getGamma()
           
 int getGammaLevels()
           
 int setBrightness(int level)
          Sets the brightness.
 int setContrast(int level)
          Sets the contrast value.
 int setGamma(int level)
          Sets the gamma adjustment value.
 
Methods inherited from interface javax.microedition.amms.control.EffectControl
getPreset, getPresetNames, getScope, isEnabled, isEnforced, setEnabled, setEnforced, setPreset, setScope
 



Field Detail

AUTO

static final int AUTO
Automatic setting.

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

NEXT

static final int NEXT
Moves the setting to the next supported level.

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

PREVIOUS

static final int PREVIOUS
Moves the setting to the previous supported level.

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0


Method Detail

setBrightness

int setBrightness(int level)
Sets the brightness. The default brightness value can be asked with the getBrightness method before setting the new value.

Brightness adjusts the average light value of the image.

The brightness value is in the range of 0 to 100, where 100 gives the brightest image. The value 50 means that no brightness correction will be made. Setting the value to AUTO turns on the automatic brightness setting. If the automatic brightness setting is not supported, setting automatic brightness on returns the current brightness value.

Parameters:
level - @return brightness value after setting the new value or AUTO if in the automatic brightness setting mode the new brightness value or NEXT or PREVIOUS to set the brightness to the next or previous supported level, respectively or AUTO to use automatic brightness setting
Throws:
IllegalArgumentException - if neither of the following is true level >= 0 and level<= 100 level is either NEXT or PREVIOUS or AUTO.
Since:
BlackBerry API 5.0.0

getBrightness

int getBrightness()
Returns:

the current brightness value or AUTO if in the automatic brightness setting mode

Since:
BlackBerry API 5.0.0

getBrightnessLevels

int getBrightnessLevels()
Returns:

the number of brightness setting levels

Since:
BlackBerry API 5.0.0

setContrast

int setContrast(int level)
Sets the contrast value. The default contrast value can be asked by getContrast before setting the new value.

The contrast adjusts the value difference between the lightest and darkest elements of an image.

The contrast value is in the range of 0 to 100 where 100 gives the image with the greatest contrast. The value 50 means that no contrast correction will be made. Setting the value to AUTO turns on the automatic contrast setting. If the automatic contrast setting is not supported, setting automatic contrast on returns the current contrast value.

Parameters:
level - @return contrast that was actually set by the implementation or AUTO if in the automatic contrast setting mode the new contrast value or NEXT or PREVIOUS to set the contrast to the next or previous supported level, respectively or AUTO to use automatic contrast setting
Throws:
IllegalArgumentException - if neither of the following is true level >= 0 and level<= 100 level is either NEXT or PREVIOUS or AUTO.
Since:
BlackBerry API 5.0.0

getContrast

int getContrast()
Returns:

the current contrast value or AUTO if in the automatic contrast setting mode

Since:
BlackBerry API 5.0.0

getContrastLevels

int getContrastLevels()
Returns:

the number of contrast setting levels

Since:
BlackBerry API 5.0.0

setGamma

int setGamma(int level)
Sets the gamma adjustment value. The default gamma value can be asked with the getGamma method before setting the new value.

Gamma adjusts the curvature of the brightness output curve of this effect. A higher gamma value makes the pixels of middle brightness level lighter and a lower gamma makes these pixels darker. High gamma values can be used, for example, to make targets in the shadows lighter and still keeping the darkest pixels dark.

The gamma adjustment value is in the range from 0 to 100. The parameter value of 50 corresponds to the gamma adjustment of 1.0. The value AUTO sets the gamma setting to automatic.

Parameters:
level - @return gamma adjustment value that was actually set or AUTO if in the automatic gamma setting mode new gamma adjustment value or NEXT or PREVIOUS to set the gamma to the next or previous supported level, respectively or AUTO to use the automatic gamma setting
Throws:
IllegalArgumentException - if neither of the following is true level >= 0 and level<= 100. level is either NEXT or PREVIOUS or AUTO.
Since:
BlackBerry API 5.0.0

getGamma

int getGamma()
Returns:

the current gamma adjustment value or AUTO if in the automatic gamma setting mode

Since:
BlackBerry API 5.0.0

getGammaLevels

int getGammaLevels()
Returns:

the number of gamma adjustment setting levels

Since:
BlackBerry API 5.0.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal