Home › Forums › TWAIN Classic › Setting PixelType and BitDepth on a Twain 1.8 scanner
- This topic has 10 replies, 2 voices, and was last updated 16 years, 1 month ago by gabe.
- AuthorPosts
Hi,
I have developed an app against a version 1.9 scanner and everything works fine.
However if i run the code against a version 1.8 scanner it does not set the Pixel Type or Bit Depth values.
I checked the ordering from the CapOrder pdf and I believe its the right order.
Is there any known issues with version 1.8 which would cause the above problem.
Any ideas?
Louis
What rc are you getting when you set the caps?
If you’re getting an rc=failure what cc are you getting?
What device?.
Hi,
The scanner is a Mustek A3 USB.
The Rc results are Success.
Would the cc results give any more information, if so how do you find the cc result?
Thanks
Louis
no the cc isn’t interesting unless rc=failure, less than interesting – worthless.
so you get rc=success… are you verifying the value after the msg_set?
while not usually needed it could be considered a best practice to run the msg_get after the msg_set to double check that the rcSuccess was in fact a success,… but in this case I don’t see how it helps…list all the caps you set in the order you set them in.
maybe something will jump out.
Order is as follows ….
OpenDSM
openDSGet support caps and validate it has what I need.
Check that each cap supports the values I want to set it to.Set the following caps..
FeederEnabled
XferCount
Inches
IPixelType
IBitDepth
IXResolution
IYResolutionThen I validate that the settings that I have just set have been setup.
EnableDS
….transfer image
Thanks
Louis
and you validate by running the msg_get? or are you looking at the imageinfo struct when the image comes over?
.
I do msg_gets at the validate stage and the check stage (before I set them)
Louis
offtopic while I think about your actual question- you don’t set IUnits.
Why?.
odd. sounds&looks like you’re doing the right stuff at the right time.
After your msg_set ops what value(s) are you getting from msg_get, msg_getcurrent & msg_getDefault?Run twister on the thing and post the results, it should look something like this:
@twister report snippet wrote:
Start of Twister TWAIN Analysis
Analysis Started: 2004.04.27 at 11:41:15
Twister Version: 1.03.006
— TW_IDENTITY block —
Product Name: ScanExpress A3 USB
Product Family:
Manufacturer:
Software Version: 62280.2233 (“F/B Scanner”)
TWAIN Protocol Version: 1.8
— DataSource File Version Info —
File: C:WINNTTwain_32L3U16Scanobj.ds
File Timestamp: 2004.04.05 08:16:38
File version: 2.6.1.1
Product version: 2.6.1.1
Description: TWAIN Module
Copyright: Copyright c 1999
Comments:
Company: Common Group
File Version: 2, 6, 1, 1
Internal Name: Nora
Language:
Legal Trademarks:
Original Filename: Scanobj.ds
Private Build:
Product Name: TWAIN Modlue
Product Version: 2, 6, 1, 1
Special Build:
Section 1. Capabilities
If a capability does not appear in the following list, then the device
reported it as unsupported, and this conforms to the TWAIN standard.
— Capability — — Value —
ICAP_PIXELTYPE: GET……………..uint16 ENUM{ TWPT_BW, TWPT_GRAY,
TWPT_RGB } Current: TWPT_RGB,
Default: TWPT_RGB
ICAP_PIXELTYPE: GETCURRENT……….uint16 TWPT_RGB
ICAP_PIXELTYPE: GETDEFAULT……….uint16 TWPT_RGB
ICAP_BITDEPTH: GET……………..*uint16 ENUM{ 1, 8,
16 } Current: 16, Default: 16
ICAP_BITDEPTH: GETCURRENT………..ditto
ICAP_BITDEPTH: GETDEFAULT………..ditto
— Compliance Summary —
(12) ICAP_BITDEPTH: MSG_GET enumeration Current index (8) is invalid.
(13) ICAP_BITDEPTH: MSG_GET enumeration Default index (8) is invalid.Sorry, copied it wrong. Inches should be IUnits
Louis
oh, and what are the values are you setting to?
.
- AuthorPosts