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 : Tuesday, February 6, 2007 8:59:05 PM(UTC)

Amit  
Amit

Groups: Registered
Posts: 101


Hi,
I am using LeadTools 14 with Visual Basic.
My program acquires 16 bit image in File Transfer Mode from Twain device.

To acquire an image, I am executing following Twain sequence
    ICAP_XFERMECH = TWSX_FILE
    ICAP_BITDEPTH = 16

Image get acquired successfully
 - At "C:\twain.bmp" which is the default path of device.
 - Acquired image is 16 bit image.

I want to acquire this image at "D:\sample.bmp" path.
To do so, I set FileTransferName property of LEADRasterTwain object to "D:\sample.bmp"
Then I execute same sequence above.

Image get acquired successfully
 - At "D:\sample.bmp"
 - Acquired image is 8 bit image.

My first question is Why the bits are changing when I just set destination path ? All other code is exactly the same except I add one line to set this property.

I discussed with developer of TWAIN Drivers.
He told me to execute following sequence to set destination path
DG_CONTROL / DAT_SETUPFILEXFER / MSG_SET

When TWAIN Drivers developer execute above sequence from Twack.exe application, he get correct results.

My second question is How could I execute above sequence using LEAD ?

 

 

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 : Wednesday, February 7, 2007 6:09:27 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

Hello,

Please test this using the minimum amount of code in a new project (just set the 2 capabilities and acquire). Does this also give a result with 8-bits? If yes, please send me this small project and I will check the issue further.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Thursday, February 8, 2007 6:16:29 AM(UTC)

Amit  
Amit

Groups: Registered
Posts: 101


Attached herewith please find sample project.
File Attachment(s):
Sample.zip (4kb) downloaded 37 time(s).
 
#4 Posted : Sunday, February 11, 2007 4:40:38 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

Hello,

Currently I am checking this issue, but I need to know the exact twain driver that you use to check this issue.

However, to be sure that the Twain driver is working properly, I need you to test using the standard Twain test utility from the Twain Working Group. This program is called Twacker and you can get it from here:
http://www.twain.org/devfiles/twack.zip

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#5 Posted : Sunday, February 11, 2007 7:58:26 PM(UTC)

Amit  
Amit

Groups: Registered
Posts: 101


Hi,

The TWAIN Device I am using is special purpose medical equipment.  TWAIN Drivers are developed by the developers of device manufacturer company.  These drivers will only work if device is connected.

The Twack.exe application I mentioned in my first poste means Twacker.exe.  I am using same for primary testing and then I implement same capabilities in my application.

Developer of drivers is also using Twacker.exe.

When we execute following sequence form Twacker program, we (me and Twain Developer) get correct results.  But when I implement same thing in my program, image become 8 bit.

   DG_CONTROL / DAT_SETUPFILEXFER / MSG_SET

      - Set FileName parameter to whatever we want

   ICAP_XFERMECH = TWSX_FILE

   ICAP_BITDEPTH = 16

Out of above sequence, I do not know how to execute DG_CONTROL / DAT_SETUPFILEXFER / MSG_SET sequence.  I guess setting FileTransferName property has the same effect.  But it is changing the bits of the image.

Acquision through Twacker.exe gives correct results.  My program fails.  I am executing same Twain sequence from my program.

1) Why image converged to 8 bit when I just set FileTransferName property

2) How can I execute DG_CONTROL / DAT_SETUPFILEXFER / MSG_SET sequence from LEAD Tools to set its FileName parameter.

 
#6 Posted : Tuesday, February 13, 2007 10:25:46 AM(UTC)

Travis  
Travis

Groups: Registered, Tech Support
Posts: 207

Was thanked: 3 time(s) in 3 post(s)

I have resolve this issue.  Internally when we set the file name
we also reset all the capabilities.  This is caused by some design
issues with the lower level portion of the tool kit. I will see if that can be redesigned to prevent this from happening.


So the solution to your issue is this:  Call 
"RasterTwain.FileTransferName = twainFileName" before you set any capabilities. 

Otherwise the ICAP_BITDEPTH gets reset to the default value.  I
have attached your demo modified for this solution.  Please try this out and let me know if this works for you.
File Attachment(s):
Sample.zip (11kb) downloaded 32 time(s).
Travis Montgomery
Senior Sales Engineer
LEAD Logo
 
#7 Posted : Friday, March 2, 2007 2:23:18 AM(UTC)

Amit  
Amit

Groups: Registered
Posts: 101


Yes, Its, working on my machine.

Still, I have to test with actual camera on client machine

I will let you know if any problem in future.

Thanks for the help

 
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.119 seconds.