|
1.0: Final Release | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
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()
Returns the current brightness value. |
int |
getBrightnessLevels()
Returns the number of brightness setting levels. |
int |
getContrast()
Returns the contrast value. |
int |
getContrastLevels()
Returns the number of contrast setting levels. |
int |
getGamma()
Returns the gamma adjustment value. |
int |
getGammaLevels()
Returns the number of gamma adjustment setting levels. |
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 |
public static final int AUTO
public static final int NEXT
public static final int PREVIOUS
Method Detail |
public int setBrightness(int level)
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.
level
- 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
AUTO
if in the automatic
brightness setting mode
java.lang.IllegalArgumentException
- if neither of the following is true
level
>= 0 and level
<= 100
level
is either NEXT
or PREVIOUS
or AUTO
.
public int getBrightness()
AUTO
if in the automatic brightness setting
modepublic int getBrightnessLevels()
public int setContrast(int level)
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.
level
- 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
AUTO
if in
the automatic contrast setting mode
java.lang.IllegalArgumentException
- if neither of the following is true
level
>= 0 and level
<= 100
level
is either NEXT
or PREVIOUS
or AUTO
.
public int getContrast()
AUTO
if in the automatic contrast setting modepublic int getContrastLevels()
public int setGamma(int level)
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.
level
- 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
AUTO
if in the automatic gamma setting mode
java.lang.IllegalArgumentException
- if neither of the following is true
level
>= 0 and level
<= 100.
level
is either NEXT
or PREVIOUS
or AUTO
.
public int getGamma()
AUTO
if in the automatic gamma setting modepublic int getGammaLevels()
|
1.0: Final Release | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |