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

ICAP_PIXELFLAVOR = TWPF_VANILLA will make scanner slow.

Forums › TWAIN Classic › ICAP_PIXELFLAVOR = TWPF_VANILLA will make scanner slow.

  • This topic has 1 reply, 2 voices, and was last updated 7 years, 9 months ago by Kaij.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • July 10, 2013 at 1:50 pm #22863 Reply
    YogaV
    Participant
    • Topics - 5
    • Replies - 4
    • Total Posts - 9

    When I set the ICAP_PIXELFLAVOR value to TWPF_VANILLA, this will make the scanner performance very slow. But TWPF_CHOCOLATE will scan the document at normal rate. Here is my code for your reference. Please suggest why this will make scanner slow.

    // Set Pixel type
    twCap.Cap = ICAP_PIXELTYPE;
    twCap.ConType = TWON_ONEVALUE;
    pval->ItemType = TWTY_UINT16;
    pval->Item = (TW_UINT32)TWPT_BW; //TWPT_BW, TWPT_GRAY, TWPT_RGB
    CallTwainProc(&m_AppId,&m_Source,DG_CONTROL,DAT_CAPABILITY,MSG_SET,(TW_MEMREF)&twCap);

    // Set pixel flavor
    twCap.Cap = ICAP_PIXELFLAVOR;
    twCap.ConType = TWON_ONEVALUE;
    pval->ItemType = TWTY_UINT16;
    pval->Item = TWPF_CHOCOLATE; //TWPF_CHOCOLATE, TWPF_VANILLA
    CallTwainProc(&m_AppId,&m_Source,DG_CONTROL,DAT_CAPABILITY,MSG_SET,(TW_MEMREF)&twCap);

    // Set Bit depth
    twCap.Cap = ICAP_BITDEPTH;
    twCap.ConType = TWON_ONEVALUE;
    pval->ItemType = TWTY_UINT16;
    pval->Item = (TW_UINT32)1; //8
    CallTwainProc(&m_AppId,&m_Source,DG_CONTROL,DAT_CAPABILITY,MSG_SET (TW_MEMREF)&twCap);

    //Set Threshold
    twCap.Cap = ICAP_THRESHOLD;
    twCap.ConType = TWON_ONEVALUE;
    pval->ItemType = TWTY_FIX32;
    v32.Whole = 255;
    v32.Frac = 0;
    pval->Item = *((TW_UINT32 *)&v32);
    CallTwainProc(&m_AppId,&m_Source,DG_CONTROL,DAT_CAPABILITY,MSG_SET,(TW_MEMREF)&twCap);

    Thanks,
    Yoga V

    July 11, 2013 at 11:51 am #25934 Reply
    Kaij
    Participant
    • Topics - 9
    • Replies - 132
    • Total Posts - 141

    Yoga,

    Your code looks fine at the first view. Have you checked that with different scanner models
    to exclude a strange inversion routine in a particular Data Source?

    I also suggest to check if the value of ICAP_THRESHOLD has any impact.

    I hope that answers your question.

    Best regards,
    Kaij

    OEM TWAIN drivers and toolkits from http://www.jse.de

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: ICAP_PIXELFLAVOR = TWPF_VANILLA will make scanner slow.
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

  • 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
  • Changing TWAIN driver defaults
  • 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.