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

Part of the scanned images obtained is corrupted #25

Open
maciejsko opened this issue Dec 6, 2017 · 10 comments
Open

Part of the scanned images obtained is corrupted #25

maciejsko opened this issue Dec 6, 2017 · 10 comments

Comments

@maciejsko
Copy link

Some of the images I scan end up somehow corrupted - they are tilted to the side as if the pixels ware alligned incorrectly.
I'm scanning using Fujitsu fi 7180 using adf and duplex, during one scanning sessions some of the pictures come out good, but some are tilted.
Do You have any idea what could be the couse and where should i look for solution of this problem ?

twaindsm.log

img000001

@bhagyesh18
Copy link

I am having same issue with IBML Scanner.

@bhagyesh18
Copy link

Did you find any solution for this issue even i am also waiting from long time.

@maciejsko
Copy link
Author

Unfortunately i couldn't find solution for this problem, but i found 'TwainDotNet' which worked for my purposes

@yongqitao
Copy link

我也遇到了这样的问题 大佬们有啥办法好解决的吗?

@yongqitao
Copy link

fujitsu fi7140

@Mark1975
Copy link

I experienced the same problem with a different scanner.
The transfer mechanism is MEMORY.
I noticed the information returned by m_twain.DatImageinfo was incorrect in my case.
When I moved the call to m_twain.DatImageinfo, so it is always called before m_twain.DatSetupmemxfer; I get consistently correct image information.

@beckham12a18
Copy link

I experienced the same problem with a different scanner.
The transfer mechanism is MEMORY.
I noticed the information returned by m_twain.DatImageinfo was incorrect in my case.
When I moved the call to m_twain.DatImageinfo, so it is always called before m_twain.DatSetupmemxfer; I get consistently correct image information.

Could you please provide more specific information about how to fix this issue. I've been experiencing this issue intermittently. The software has worked fine in most cases, but sometimes the scanned images got corrupted.

My scanner is fi-7180.

Thanks.

@mattzirkle
Copy link

I noticed that the twaincsscan test application skews the image, but when doing a NATIVE transfer with the TWAIN class it seems to work.

@Mark1975
Copy link

I experienced the same problem with a different scanner.
The transfer mechanism is MEMORY.
I noticed the information returned by m_twain.DatImageinfo was incorrect in my case.
When I moved the call to m_twain.DatImageinfo, so it is always called before m_twain.DatSetupmemxfer; I get consistently correct image information.

Could you please provide more specific information about how to fix this issue. I've been experiencing this issue intermittently. The software has worked fine in most cases, but sometimes the scanned images got corrupted.

My scanner is fi-7180.

Thanks.

In file TWAINCSTool.cs

just after the lines
else if (m_twsxXferMech == TWAIN.TWSX.MEMORY) {
Paste the following lines of code:
sts = m_twain.DatImageinfo(TWAIN.DG.IMAGE, TWAIN.MSG.GET, ref twimageinfo); if (sts != TWAIN.STS.SUCCESS) { WriteOutput("ImageInfo failed: " + sts + Environment.NewLine); m_twain.Rollback(m_stateAfterScan); ReportImage("ScanCallback: 011.1", TWAIN.DG.IMAGE.ToString(), TWAIN.DAT.IMAGEINFO.ToString(), TWAIN.MSG.GET.ToString(), sts, null, null, null, null, 0); return (TWAIN.STS.SUCCESS); }

In my case, this solved the issue.
I didn't submit this code, because I can't check if this fixes the problem for other users. (I only have a single scanner I can use to test).

@beckham12a18
Copy link

Thanks all for your help.

I've tried using the NATIVE mode to see if it helps. If not, then I will try modifying the codes as suggested by Mark1975.

I will let you know the result.

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

No branches or pull requests

6 participants