Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More Sample Code please #30

Open
cutterman-cn opened this issue Mar 21, 2022 · 1 comment
Open

More Sample Code please #30

cutterman-cn opened this issue Mar 21, 2022 · 1 comment

Comments

@cutterman-cn
Copy link

cutterman-cn commented Mar 21, 2022

I want to transfer images from Scanner and output to local disk.
when call source.waitReady(); the scanner start working and scan papers
But I dont know how to get the result images data from
source.imageNativeXfer(xfer);
this api only return one image result and I dont know how to get all.

Is there any codes like

for (int i=0; i<imageCount; i++) {
    // get image data one by one
   auto data = xfer[i].data();
  /// ....
}

or is there any simple way that I put a local path to some source api, where the source output image to that path automaticly.

thanks for help!

@xricht17
Copy link
Owner

Hi @cutterman-cn,

twpp is quite close to the standard, low-level TWAIN API but with some added abstractions for convenience. You still need to familiarize yourself with the TWAIN specification in order to use it. Look for Advanced Application Implementation > Transfer of Multiple Images in the specification PDF, and you should be able to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants