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

Capability ICAP_BRIGHTNESS setting not reflecting in state 4

Forums › TWAIN Classic › Capability ICAP_BRIGHTNESS setting not reflecting in state 4

  • This topic has 1 reply, 2 voices, and was last updated 13 years, 8 months ago by gabe.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • May 3, 2007 at 10:36 am #22128 Reply
    rajesh_082sn
    Participant
    • Topics - 1
    • Replies - 1
    • Total Posts - 2

    Hi
    Any one knows what could be the problem ,im setting the brightness
    with in the range from source ,but does not reflect the setting when i say “acquire” below is the code


    TwainStat twainScanner; //initialization pre-session state 1
    vector deviceNames;
    TW_BOOL sourManagerLoaded = twainScanner.loadSourceManager(); //state 2 source manager loaded
    twainScanner.registerApp(1,3,TWLG_ENGLISH_USA,
    TWCY_INDIA,"My Application Version Information","Elvista Digital Systems",
    "OMR","IGrader");
    twainScanner.openSourceManager(); //state 3 open source manager

    //twainScanner.showSMNativeSources();
    deviceNames = twainScanner.listSMSources(); //list available sources.
    if(deviceNames.size() == 0){
    printf("vector list is empty");
    }else
    {
    for(int i = 0;i {

    printf("nn %d devices %s",(i+1),deviceNames.at(i).c_str());
    }
    }


    std::string strd = deviceNames.at(2);

    TW_IDENTITY source = twainScanner.getSourceIdentity((LPSTR)strd.c_str());
    twainScanner.openSource(source); //for loading and initializing the source(state 4);open_source
    //twainScanner.listSupportedCapabilities(source);

    //TW_FIX32 bright = twainScanner.FloattoFix32( 1000.0);
    // printf("nFraction %f ",bright.Frac);
    //printf("nWhole number %d",bright.Whole);
    TW_UINT16 itemType;
    TW_UINT32 item = 100;
    TW_FIX32 fix32Val = twainScanner.FloattoFix32( 100 );
    itemType = TWTY_FIX32;
    // item = fix32Val;
    twainScanner.showNativeSourceInterface( source,false );//showing the native source interface.(state 5);source_enabled
    twainScanner.setCapability( source, itemType,item );
    twainScanner.getCapability( ICAP_BRIGHTNESS ,source ); //here i can't see the changes on the settings

    //twainScanner.listSupportedCapabilities(source);

    twainScanner.ApplicationEventLoop( source );
    twainScanner.freeDLLibrary();

    Thanks for any help[/list]

    May 3, 2007 at 5:55 pm #23759 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    I would send a msg_get to the source in a twon_range and check the stepsize. If everything else is working I’d guess that the source is using 1000 as the stepsize and rounding the 100 you’re trying to set down.

    Check the rc/cc for your calls to see if you’re failing for some reason and checking supportedCaps with querysupport will also occationally provide some insight.

    One question, you call:


    twainScanner.showNativeSourceInterface( source,false );

    just before you set and get the values. Is the vendor Ui up when you get and set the values?

    .

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Capability ICAP_BRIGHTNESS setting not reflecting in state 4
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

  • EPSON V600 TWAIN and WIA on Windows 10
  • When and how to use WaitForEvents command ?
  • Problem enumerating list of installed scanners in windows server 2012
  • Failed to create TWAIN progress! Error code is 1260.
  • To get the list of scanners from javascript client side (browser)
  • 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.