DTWAIN_GetCompressionSize |
Top Previous Next |
The DTWAIN_GetCompressionSize function returns the size of the last acquired compressed image.
DTWAIN_BOOL DTWAIN_GetCompressionType (
Parameters Source An open TWAIN Source.
lpCompressionSize Address of a LONG variable that will receive the compression size.
Return Values The return value is TRUE if successful. Otherwise FALSE is returned.
Comments The DTWAIN_GetCompressionSize function gets the image size in bytes of the last compressed image that was acquired. When calling DTWAIN_AcquireBuffered, the application has the choice of using compression. The DTWAIN_GetCompressionSize function returns the total size of the compressed image when the image is acquired successfully. The lpCompressionSize pointer is the address of a LONG that will be filled in with the size on return.
DTWAIN_GetCompressionSize should be called in response to the DTWAIN_TN_TRANSFERDONE notification. Each time the Source Source acquires an image, the compression size is reset to 0, so it is most advantageous to get the compression size right after the transfer of each page is done.
TWAIN State Transitions The Source must be in State 4 or higher.
Prerequisite Function Call(s)
DTWAIN Source Selection Function
See Also DTWAIN_AcquireBuffered, DTWAIN_EnumCompressionTypes, DTWAIN_SetCompressionType |