Loading...

How to get properties of front side and back side (TWAIN)

Support for GdPicture Light Imaging Toolkit and GdPicture Pro Imaging ActiveX/SDK.

How to get properties of front side and back side (TWAIN)

Postby irab » Thu Oct 15, 2009 12:09 pm

Hi Loïc!

I'm using TWAIN functions to aquire pictures from a Fujitsu fi-5750C document scanner, and I have the following questions:

1. I want to save the pictures into JPG if they are coloured, and I want to save them into TIF if they are BW. (duplex mode = True)
If the front side and the back side are differents (Automatic Color Detection = True), how can I get their properties (TwainGetCurrentBitDepth, TwainGetCurrentPixelType) during scanning?
At the moment I only get the back side's propreties. :(

2. Is it possible to set the Automatic Color Detection = True/False (this is a VRS propertie) from a VB6 program?
Code: Select all
Imaging1.TwainSelectFeeder (True)
Imaging1.TwainEnableDuplex (True)
Imaging1.TwainSetCapCurrentNumeric(ICAP_ORIENTATION, Imaging1.TwainGetCapItemType(ICAP_ORIENTATION), 3)
Imaging1.TwainSetCurrentPixelType(2)
Imaging1.TwainSetCurrentResolution (300)

Do While Imaging1.CreateImageFromTwain(Me.hwnd) <> 0
            Debug.Print Imaging1.TwainGetCurrentBitDepth
            Debug.Print Imaging1.TwainGetCurrentPixelType
            '.......
Loop

Thank you in advance.

Best regards
Irab
irab
 
Posts: 10
Joined: Thu Jun 26, 2008 9:21 am

Re: How to get properties of front side and back side (TWAIN)

Postby Loïc » Thu Oct 15, 2009 4:58 pm

Hi Irab,

Just use the GetPixelDepth() function after CreateImageFromTwain().

If the returned value is 1: Save as tiff, Else save as JPEG :wink:


For your color detection issue, I suggest you to ask to Kofax the cap value used to control this capability. Then, you will be able to manage it using the TwainSetCapCurrentNumeric function.

With best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4437
Joined: Tue Oct 17, 2006 10:48 pm
Location: France


Return to GdPicture [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 3 guests

cron