DTWAIN_SetResolution

Top  Previous  Next

The DTWAIN_SetResolution function sets the current resolution value for the Source.

 

DTWAIN_BOOL DTWAIN_SetResolution (

DTWAIN_SOURCE

Source,

DTWAIN_FLOAT

Resolution );

 

Parameters

Source

An open TWAIN Source.

 

Resolution

The resolution value to set the Source.

 

Return Values

The return value is TRUE if successful.  Otherwise FALSE is returned.

 

Comments

The DTWAIN_SetResolution function sets the current resolution value for the  Source Source.  The Resolution argument denotes the resolution value of the acquired image.  Note that some Sources do not support a resolution setting, so the return value for DTWAIN_SetResolution will always be FALSE.  If the resolution value is out of range of the Source, DTWAIN will choose the closest resolution value that the Source regards as valid.

 

Setting the resolution value may not work for all Sources.  If the resolution value is not set after calling this function, either the Source does not support setting the resolution (which in this case, a FALSE value is returned form DTWAIN_SetResolution), or it does not actually set the resolution, but still returns a TRUE stating that the resolution 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 resolution value, call DTWAIN_GetResolution.

 

For languages that have difficulties with DTWAIN_FLOAT parameters, the alternate function that can be used as a replacement for DTWAIN_SetResolution is DTWAIN_SetResolutionString.

 

 

TWAIN State Transitions

The Source must be in State 4. or higher

 

Prerequisite Function Call(s)

DTWAIN_SysInitialize

 

DTWAIN Source Selection Function

 

 

See Also

Setting / Getting X-Y Resolution Values