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

How to set Automatic border detection

Forums › TWAIN Classic › How to set Automatic border detection

  • This topic has 1 reply, 2 voices, and was last updated 14 years, 1 month ago by Dark Angel.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • November 16, 2006 at 7:22 am #22039 Reply
    ff.in.twain
    Participant
    • Topics - 2
    • Replies - 8
    • Total Posts - 10

    Hi,

    I’m writing a win32C++ twain application to operate EPSON 10000XL flatbed scanner. I have been able to open and scan images successfully. But I’m struggling to change the capabilities.

    Specillay I want to set the following two boolean capabilities to TRUE.
    ICAP_AUTOMATICBORDERDETECTION
    ICAP_AUTOMATICROTATE

    I tried it in the following manner.

    – Load the TWAIN DLL and collect DSM Entry Proc.

    – Send triplet (DG_CONTROL,DAT_PARENT,MSG_OPENDSM):
    received success.

    – Send triplet (DG_CONTROL,DAT_IDENTITY,MSG_USERSELECT):
    received success. Selected 10000XL.

    – Send triplet (DG_CONTROL,DAT_IDENTITY,MSG_OPENDS):
    received success.

    – Send triplet (DG_CONTROL,DAT_CAPABILITY,MSG_SET):
    twCapability.Cap = CAP_XFERCOUNT;
    twCapability.ConType = TWON_ONEVALUE;
    value is set to 1
    received success.

    – Send triplet (DG_CONTROL,DAT_CAPABILITY,MSG_SET):
    twCapability.Cap = ICAP_UNDEFINEDIMAGESIZE;
    twCapability.ConType = TWON_ONEVALUE;
    value is set to TRUE (1)
    received failure

    – Send triplet (DG_CONTROL,DAT_CAPABILITY,MSG_SET):
    twCapability.Cap = ICAP_AUTOMATICBORDERDETECTION;
    twCapability.ConType = TWON_ONEVALUE;
    value is set to TRUE (1)
    received failure

    Please help me to find out what causes my last two calls to fail.

    Thanking you in advance.

    Best Regards,

    FF

    December 17, 2006 at 5:46 pm #23533 Reply
    Dark Angel
    Participant
    • Topics - 3
    • Replies - 5
    • Total Posts - 8

    maybe the source doesn’t support this capability

    try to negotiate the source about the capability if it’s supported.

    DG_Control/ DAT_Capability/ MSG_QuerySupport

    if it returns 0 then the capability is not supported
    if it returns 13 the capability is readonly
    if it returns 31 the capability is supported

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: How to set Automatic border detection
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.