Page 1 of 1

Scanning document with black background...

Posted: Wed Jan 13, 2010 10:26 am
by bharate.umesh
Alexey,

When I scan a document by setting Pixel Type as 'BW', it is scanned with black background instead of white backgrond.

Have any property for setting a scanner like 'INVERT COLOR'?

Thanks,Umesh

Re: Scanning document with black background...

Posted: Wed Jan 13, 2010 11:34 am
by Alex
Hello Umesh,

DeviceCapability.IPixelFlavor capability allows to specify value (0 or 1) of the black color.

Best regards, Alexander

Re: Scanning document with black background...

Posted: Wed Jan 13, 2010 12:34 pm
by bharate.umesh
Thanks Alexey.

Should I set the values as below?

VSTwain.PixelType = Vintasoft.Twain.PixelType.BW
VSTwain.Capability = DeviceCapability.IPixelFlavor

I have used Kodak i1120 Scanner, it is working fine without the above code.

It scan perfectly without black background at our place.

Our client is using Kodak i30/40 scanner.

Is the above code will work at our client place or will it scan with white background?

Please suggest your code.

Re: Scanning document with black background...

Posted: Thu Jan 14, 2010 9:38 am
by Alex
Hello,

Here is a code snippet:

Code: Select all

.....
VSTwain1.OpenDataSource()
VSTwain1.PixelType = PixelType.BW
VSTwain1.Capability = DeviceCapability.IPixelFlavor
VSTwain1.CapType = CapType.OneValue
' 0 (CHOCOLATE) - zero pixel represents darkest shade, 1 (VANILLA) - zero pixel represents lightest shade
VSTwain1.CapValue = 0
VSTwain1.SetCap()
.....
Also please try to use the Native transfer mode (VSTwain1.TransferMode = TransferMode.Native) instead of the Memory trnsfer mode and let me know results.

Best regards, Alexander

Re: Scanning document with black background...

Posted: Thu Jan 14, 2010 10:56 am
by bharate.umesh
Hello,

I have installed Kodak Imaging Professional on my machine.

I scan document with BW pixel type and upload to the FTP.

If I open with other windows viewer, document looks good, but if I open with Kodak, it is black background.

Thanks,Umesh

Re: Scanning document with black background...

Posted: Mon Jan 18, 2010 9:05 am
by bharate.umesh
Alexey,

I have added the following code when I going to scan an image.

VSTwain.IsTwain2Compatible = True

But it is showing an error, saying that " Twain DLL is not found. - at Vintasoft.Twain.StartDevice."

I've gone through the your FAQ section and found the below.

Can I use VintaSoftTwain.NET SDK in 64-bit version of Windows?

Yes, you can use VintaSoftTwain.NET SDK in 64-bit version of Windows.

Here is a list of steps that you should do:
•Download the latest version of TWAIN Data Source Manager from TWAIN web site (twaindsm-X.Y.Z.win.bin.zip file)
•Place twaindsm.dll and twaindsm32.msm (files from "twaindsm-X.Y.Z.win.bin.zip\Twain32" directory) into the "Windows\SysWow64\" directory
•Place twaindsm.dll and twaindsm64.msm (files from "twaindsm-X.Y.Z.win.bin.zip\Twain64" directory) into the "Windows\System32\" directory
•Specify path to the TWAIN Data Source Manager in your code:
...
VSTwain1.TwainDllPath = "c:\Windows\SysWow64\twaindsm.dll"
VSTwain1.IsTwain2Compatible = True
VSTwain1.StartDevice()
...

I've downloaded two folders from TWAIN website.
1) "twain 32" folder contains TWAINDSM32.msm and TWAINDSM.dll files.
2) "twain 64" folder contains TWAINDSM64.msm and TWAINDSM.dll files.

My machine is 32 bit.
I copied TWAINDSM.dll to C:\ WINDOWS \ system \ from twain 32 folder.and write the following code before VsTwain.StartDevice. ..............VsTwain.TwainDllPath = " C:\ WINDOWS \ system \ TWAINDSM.dll "VsTwain.IsTwain2Compatible = True.............

But still the image showing black background in kodak viewer.

Please provide solution on it.

Thanks,Umesh

------------------------------------------

Hello Umesh,

Thanks for your e-mail!

Yes, as it shows "TWAIN version: 2.0 and TWAIN 2.0 compatible: True" set Is= Twain2Compatible Property to true and test how it works.

Please let me know results.

Anyway do not use WIA.

Re: Scanning document with black background...

Posted: Wed Jan 20, 2010 2:59 pm
by bharate.umesh
Great!

Now, it is working fine.

Thanks,Umesh