tmyroadctfig / twaindotnet

MIT License
180 stars 117 forks source link

Trying to set 1200 DPI on Epson scanner #16

Closed ijourneaux closed 10 years ago

ijourneaux commented 10 years ago

I am trying to set 1200 DPI on my Epson Perfection V550 scanner. I end up getting a TWAINException indicating "TwainDotNet.TwainNative.ConditionCode.CapabilitySequenceError". The scanner is certainly capable of 1200pi (as well as even high dpi values).

I am using TWAINDotNet from VB.Net 2010

ijourneaux commented 10 years ago

Working with Epson, I was able to solve the problem. On the V550 scanner, the maximum resolution is a fuction of the area to be scanned. For a full 8.5inx11in page, the maximum resolution is 1184dpi.

To set resolutions higher than 1200dpi, you need to set the area to be scanned to a smaller region.

To correct the issue, in datasource.cs, all you have to do is move the

if (settings.Area != null)
{
    NegotiateArea(settings);
}

before

if (settings.Resolution != null)
{
    NegotiateColour(settings);
    NegotiateResolution(settings);
}
tmyroadctfig commented 10 years ago

Can you issue a pull request?

ijourneaux commented 10 years ago

I have replicated the git repository to my machine and made the change pushed the changes (looks like it is to the local repository but I can't seem to generate the pull request. Not much experience with GIT so I am probably just missing something obvious

tmyroadctfig commented 10 years ago

It can be a bit tricky. One thing to check is that your local branch is tracking your github branch, i.e. local/master track origin/master. Once you can see your commit here: https://github.com/ijourneaux/twaindotnet/commits/master then you should be able to issue a pull request.

Cheers, Luke

tmyroadctfig commented 10 years ago

Thanks :)