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, April 10, 2008 4:26:18 PM(UTC)

Annie  
Annie

Groups: Registered
Posts: 6


I am trying to scan using L_TwainAcquireMulti using Canon LiDE 25 scanner and keep getting ERROR_BITPERPIXEL (errorcode -27) error. Not sure what the problem is, I read on another post it could be due to the fact the bits/pixel of source images could be different from the new image that needs to be saved.

Params passed to L_TwainAcquireMulti:
L_TCHAR *pszBaseFileName = FILENAME.CMP

L_UINT uFlags = 0

L_UINT uTransferMode = LeadTwainLib.LTWAIN_NATIVE_MODE

L_INT nFormat = LEADLib.FileConstants.FILE_LEAD1BIT

L_INT nBitsPerPixel= 1

L_BOOL bMultiPageFile = 0

L_UINT32 uUserBufSize = 0

L_BOOL bUsePreferredBuffer= 1

LTWAINACQUIRECALLBACK pfnCallBack= IntPtr.Zero

L_VOID * pUserData = IntPtr.Zero

What could be possible cause of the error?

 

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, April 11, 2008 8:42:21 AM(UTC)

Annie  
Annie

Groups: Registered
Posts: 6


Follow up... How do I solve this problem? Preferably not throught LEADLib. Is there a way to change scanner settings?
 
#3 Posted : Sunday, April 13, 2008 5:54:36 AM(UTC)

Yasir Alani  
Guest

Groups: Guests
Posts: 3,022

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


1. If you use our Fast Twain demo, does it work with the scanner?


2. Which version of LEADTOOLS are you using?

 
#4 Posted : Tuesday, April 15, 2008 10:50:49 AM(UTC)

Annie  
Annie

Groups: Registered
Posts: 6


I am using version 13 of LEADTools.

Where do I get the Fast Twain Demo from? Could you point to a place in documentation which describes how to use the Fast Twain Demo?

Thanks
 
#5 Posted : Tuesday, April 15, 2008 10:11:55 PM(UTC)

Yasir Alani  
Guest

Groups: Guests
Posts: 3,022

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


Do you specifically need the Fast Twain features? Fast Twain
is a set of optimization functions that speed up data transfer from high-speed
scanners when acquiring large batches of pages. It is only included in
LEADTOOLS Document Imaging toolkits. The DLL API demo for Fast Twain is in this folder:


LEADTOOLS13\Examples\DLL\FASTTWN


 


If you only want to perform multi-page scanning, you can use the regular Acquire function.


 


If you are using a .NET programming interface, it might be
easier to use the COM objects instead of the C-style DLL API. The regular Twain demos shipped with toolkit are:


LEADTOOLS13\Examples\DLL\Twain (uses the DLL API)


LEADTOOLS13\Examples\COM\VB\TWAIN32 (uses COM Objects).

 
#6 Posted : Wednesday, April 16, 2008 8:06:24 AM(UTC)

Annie  
Annie

Groups: Registered
Posts: 6


Thanks I will take a look at these, though the application I am working on provides both kind of features - single page scanning and bulk (multiple page scanning). I am getting error code -27 in both cases.

I also tried using Twacker, and noticed that the value of Capability: ICAP_PIXELTYPE is always TWPT_RGB which is 24 bits/pixel. If I change this value to TWPT_BW & do getCurrent it returns TWPT_BW . But if I close twacker and open it again the value gets reset to TWPT_RGB.

Could this be a limitation of the scanner that it is not able to persist TWAIN capability changes?
Would using L_TwainSetCapability to change the value of capability for a particular scanning session help eliminate error code -27?
 
#7 Posted : Thursday, April 17, 2008 2:36:41 AM(UTC)

Yasir Alani  
Guest

Groups: Guests
Posts: 3,022

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


It is normal for some Twain drivers not to preserve
capability values between scanning sessions, some of them even resetting values
without closing the application. With some drivers, starting to scan a new page or new group of pages will cause capability values to change.


 


This means you should always explicitly set the capabilities you need before every scan job.

 
#8 Posted : Thursday, April 17, 2008 11:25:02 AM(UTC)

Annie  
Annie

Groups: Registered
Posts: 6


Thanks. I used L_TwainSetCapability to set ICAP_PIXELTYPE to TWPT_BW and it works now.
 
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.146 seconds.