DTWAIN_SetBrightness
The DTWAIN_SetBrightness function sets the current brightness value for the Source.
DTWAIN_BOOL DTWAIN_SetBrightness (
Parameters Source An open TWAIN Source.
Brightness The brightness value to set the Source.
Return Values The return value is TRUE if successful. Otherwise FALSE is returned.
Comments The DTWAIN_SetBrightness function sets the current brightness value for the Source Source. The Brightness argument denotes the brightness value of the acquired image. The brightness can be in the range between -1000.0 and +1000.0, with 0.0 being the default value for the brightness.
Note that some Sources do not support a brightness setting, so the return value for DTWAIN_SetBrightness will always be FALSE. If the brightness value is out of range of the Source, DTWAIN will choose the closest brightness value that the Source regards as valid.
Setting the brightness value may not work for all Sources. If the brightness value is not set after calling this function, either the Source does not support setting the brightness (which in this case, a FALSE value is returned form DTWAIN_SetBrightness), or it does not actually set the brightness, but still returns a TRUE stating that the brightness was set. The latter case is a result of an improperly implemented Twain Source, and the manufacturer of the scanner should be contacted for further details.
To get the current brightness value, call DTWAIN_GetBrightness.
For languages that have difficulties with DTWAIN_FLOAT parameters, the alternate function that can be used as a replacement for DTWAIN_SetBrightness is DTWAIN_SetBrightnessString.
TWAIN State Transitions The Source must be in State 4. or higher
Prerequisite Function Call(s) DTWAIN Source Selection Function
See Also |