Forum Replies Created
- AuthorPosts
Ah. Well, rogers, may not be around anymore to see your solution, but hopefully it will help future searchers.
—
Software consultingI know this is several years after your post, but I will post anyways (for future searchers).
First of all, according to the latest twain.h and TWAIN 2.1 spec, ICAP_AUTODISCARDBLANKPAGES was added (readded?) in TWAIN 2.0.
My Fujitsu 5120c also claims to support ICAP_AUTODISCARDBLANKPAGES, but it does not work because I am using an older TWAIN 1.7 DLL (even though setting it to TWBP_AUTO does not cause TWAIN to complain).
Thus, the only solution for my application is to analyze the sheet image to determine whether it is blank or not. Since I am working in black-and-white (1bpp), all I do is count the percentage of black pixels in the image. If it is above 1.5%, I consider the sheet not blank. This threshold value will differ based on the types of sheets you are scanning (3-5% for my sheets).
So, if I understand correctly, you want to scan a bunch of sheets in duplex mode but want to automatically discard any blank sides of the sheets, right?
Currently you are somehow using IrfanView to do this, which works for the first sheet scanned, but fails for sheets afterward.How about you invoke IrfanView once for every sheet in the scanner? Just tell the scanner to grab only one page. This way, you can keep your current set up and the compression won’t revert back to internal/none.
If not, you could try:
1. Update your kodak driver
2. Update your TWAIN DSM (replace twain_32.dll with the new one: http://sourceforge.net/projects/twain-dsm/)Hi PGlynn,
Let me try to help you out.
How are you scanning the sheets? Is it through a TWAIN application you wrote yourself or through a 3rd party program like IrfanView?
If it is through your own TWAIN application, are you setting the TWAIN settings while suppressing the user interface?Hi,
From what you wrote, I believe you are checking the resolution in state 6.
Why don’t you just check the current resolution in state 4 using ICAP_XRESOLUTION/ICAP_YRESOLUTION?
Then you can restrict the DS to use only 200, 300, or 600 dpi and display the UI if the current resolution is not supported by your application.I think the problem might be that you are trying to change capabilities while in state 6 which is not allowed.
By the way, which scanner are you using?
Also, if you are interested in knowing how TWAIN compliant each scanner is in reality, you can check out the Twister reports:
http://www.eztwain.com/twister-reports.php- AuthorPosts