TWAIN Working Group

Newsletter Signup
Donate
Help keep TWAIN free
  • About TWAIN
    • What’s New?
    • News
    • Events
    • Membership
    • Consider a Donation
    • Contact Us
  • Why TWAIN?
  • Developers
    • Driver Developer
    • Application Developer
    • TWAIN Features
    • Specification & Tools
    • Self Certification Process
  • Support Forums
  • Scanner End-User
  • Find Certified Drivers
    • Facebook
    • LinkedIn
    • Vimeo

Setting PixelType and BitDepth on a Twain 1.8 scanner

Forums › TWAIN Classic › Setting PixelType and BitDepth on a Twain 1.8 scanner

  • This topic has 10 replies, 2 voices, and was last updated 13 years, 1 month ago by gabe.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • March 11, 2008 at 11:46 am #22300 Reply
    LouisKenney
    Participant
    • Topics - 1
    • Replies - 4
    • Total Posts - 5

    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

    March 14, 2008 at 12:06 am #24398 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    What rc are you getting when you set the caps?
    If you’re getting an rc=failure what cc are you getting?
    What device?

    .

    March 14, 2008 at 8:49 am #24399 Reply
    LouisKenney
    Participant
    • Topics - 1
    • Replies - 4
    • Total Posts - 5

    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

    March 14, 2008 at 9:29 am #24400 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    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

    .

    March 14, 2008 at 9:42 am #24401 Reply
    LouisKenney
    Participant
    • Topics - 1
    • Replies - 4
    • Total Posts - 5

    Order is as follows ….

    OpenDSM
    openDS

    Get 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
    IYResolution

    Then I validate that the settings that I have just set have been setup.

    EnableDS

    ….transfer image

    Thanks

    Louis

    March 14, 2008 at 9:47 am #24402 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    and you validate by running the msg_get? or are you looking at the imageinfo struct when the image comes over?

    .

    March 14, 2008 at 9:49 am #24403 Reply
    LouisKenney
    Participant
    • Topics - 1
    • Replies - 4
    • Total Posts - 5

    I do msg_gets at the validate stage and the check stage (before I set them)

    Louis

    March 14, 2008 at 9:56 am #24404 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    offtopic while I think about your actual question- you don’t set IUnits.
    Why?

    .

    March 14, 2008 at 10:10 am #24405 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    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.

    March 14, 2008 at 10:10 am #24406 Reply
    LouisKenney
    Participant
    • Topics - 1
    • Replies - 4
    • Total Posts - 5

    Sorry, copied it wrong. Inches should be IUnits

    Louis

    March 14, 2008 at 10:13 am #24407 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    oh, and what are the values are you setting to?

    .

  • Author
    Posts
Viewing 11 posts - 1 through 11 (of 11 total)
Reply To: Setting PixelType and BitDepth on a Twain 1.8 scanner
Your information:




Quick Links

Service Providers
TWAIN Support Forums
Membership
Contact Us
Privacy Policy

Newsletter Signup

TWAIN Working Group Family

TWAIN Working Group
TWAIN Direct®
TWAIN Resources
TWAIN Certified Drivers
PDF/raster

  • Facebook
  • GitHub
  • LinkedIn
  • Vimeo

Recent Topics

  • TWAIN for dental imaging integration
  • PDF/R For who and where?
  • Making searchable PDF with PDF/R
  • Backward compatibility with PDF/A and traditional PDF
  • could not open the twain source. Make sure there is a valid source for your sca
  • Quarterly Newsletter
  • TWAIN Working Group Membership
  • Logo Usage
  • TWAIN License
  • Contact Us
Privacy Policy • Privacy Tools • Copyright © 2021 TWAIN Working Group • by iHwy, LLC • Log in

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.