Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, December 15, 2011 4:58:03 AM(UTC)

papyrum  
papyrum

Groups: Registered
Posts: 32







Hello!

I am using Visual Studio 2010, framework 4 and leadtools 17.5 for VB.Net.

We are trying to develop a scanning application that works with most of scans. We have tested it with some devices and it works fine, but using a HP Photosmart C5280, we get a problem:

Using any other device instead of this HP scanner, when we read the supported ImageXResolution we get values that we think are normal (100,200,300, etc), but when we use the HP scanner, we get values between 12 and 16000. In both cases, ImageUnit capability value is Inches.

Trying to use the HP scanner with the Leadtools Twain High Demo, in Template screen, the combobox for resolution load all values between 12 and 16000 and when we adquire the image, it says there is a problem with this resolution.

If we use the HP scanning application, in the setup screen, in its own resolution combobox, it loads values like 75,100,200,300,600, 1200.

If that values are really inches, I can get the DPI values with the formula: DPI = pixels/inches but, what happens with the others scanners? In the others I also get inche as ImageUnit but it really seems that ImageXResolution values are pixels so, how can I get the difference to use the formula or not?

It is difficult to explain but I hope you could understand me.

I am attaching some images.

Pablo L.G.
File Attachment(s):
Imgs.rar (361kb) downloaded 31 time(s).
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Friday, December 16, 2011 2:16:41 PM(UTC)

Walter  
Walter

Groups: Tech Support
Posts: 366

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)

Hello Pablo,

Try using a tool from Twain.org called Twacker.  Twacker can be downloaded from:
http://twain.org/docs/Twack_32.msi (32 bit) or
http://twain.org/docs/Twack_64.msi (64 bit)

In general, if a scanner works with Twacker, it should work with LEADTOOLS. If the scanner has the same problem in Twacker, then the problem lies in the Twain driver and you should contact the manufacturer.

The issue here is the values being returned when querying the Twain driver. We're not modifying these values at all, so I would expect you'll see the identical output with Twacker as well.

It's likely that the HP application is translating these values internally, but we're not doing the same thing.
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#3 Posted : Sunday, December 18, 2011 10:14:00 PM(UTC)

papyrum  
papyrum

Groups: Registered
Posts: 32


Hello Walter,

Could you take a look to the attached file? I think you forgot it :)

There, you can see I have used Twacker.

 
#4 Posted : Monday, December 19, 2011 5:26:11 AM(UTC)

Walter  
Walter

Groups: Tech Support
Posts: 366

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)

Hello Pablo,

Sorry about that. I missed the attachment, but it seems that Twacker shows the same issue with your "HP scanner caps.png". If you look at the returned values for ICAP_XRESOLUTION, it states that the minimum possible value you can set is 12. The maximum possible value is 16000. The step size is 1, so you can set the resolution to be 12, 13, 14, 15,... 300, 301, 302, 303... etc, all the way to 16000.

Twacker is returning the same exact values that we are, so this does not sound like a LEADTOOLS issue. The issue is how the HP driver has defined their resolution levels.

Is our demo indicating that there was a problem with the resolution, or are you seeing some other dialog indicating there's a problem with the resolution?

Is it only specific resolutions that you're seeing this issue with? If you scan at 150, 300, 600, etc, do you see this message? Do you see the same message with Twacker?
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#5 Posted : Tuesday, December 20, 2011 3:57:50 AM(UTC)

papyrum  
papyrum

Groups: Registered
Posts: 32


Hello Walter!

Actually, there is nothing indicating an error:

- Using Leadtool demo or Twacker, I can choose any resolution between 12 and 16000. If I choose 16000, in the HP twain setup dialog, it shows that we are going to scan at 16000 dpi and it says is too much and could be problematic.

 Trying with a normal resolution, it works.

What makes me confused is the Twain documentation. It says:

ICAP_XRESOLUTION
Description
All the X-axis resolutions the Source can provide.
Measured in units of pixels per unit as defined by ICAP_UNITS.....

In every scanners that I tryied it, the ICAP_UNITS returns Inches but only in HP scanner seems to be true...


I hope you undestand my confusion :P

Thanks,

Pablo L.G.
 
#6 Posted : Tuesday, December 20, 2011 5:13:53 AM(UTC)

Walter  
Walter

Groups: Tech Support
Posts: 366

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)

Hey Pablo,

I understand your confusion, but this issue is with the Twain driver and not LEADTOOLS. As you've noted, LEADTOOLS is showing the same thing as Twacker. Twacker is written in pure Twain code, and is put out by the group that publishes the Twain Specifications. Since Twacker is showing the same thing, the issue is with the device driver. A better source of information regarding with would be HP. They can better tell you why their driver gives the values that it does, and how to interpret them (if any interpretation is needed).

It would seem their UI simply gives the common resolutions to it's users while many other are possible.
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#7 Posted : Tuesday, December 20, 2011 12:07:48 PM(UTC)

papyrum  
papyrum

Groups: Registered
Posts: 32


Thanks a lot Walter :)

I would try to contact HP then.

Bye!
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.116 seconds.