Created
August 20, 2020 03:16
-
-
Save yushulx/1c3a3c43e1c16dd672574a4f6f96b0e6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function acquireImage() { | |
| if (DWServiceObject) { | |
| var onSuccess, onFailure; | |
| onSuccess = onFailure = function () { | |
| DWServiceObject.CloseSource(); | |
| }; | |
| var deviceConfiguration = { | |
| SelectSourceByIndex: 0, | |
| IfShowUI: false, | |
| PixelType:Dynamsoft.EnumDWT_PixelType.TWPT_RGB, | |
| Resolution: 300, | |
| IfFeederEnabled: false, | |
| IfDuplexEnabled: false, | |
| IfDisableSourceAfterAcquire: true, | |
| }; | |
| DWServiceObject.SelectSourceByIndex(document.getElementById('source').selectedIndex); | |
| DWServiceObject.AcquireImage(deviceConfiguration, onSuccess, onFailure); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment