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

Customizing the zooming capability

Forums › TWAIN Classic › Customizing the zooming capability

  • This topic has 5 replies, 2 voices, and was last updated 13 years, 3 months ago by gabe.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • September 27, 2007 at 6:48 am #22223 Reply
    Ishmeet
    Participant
    • Topics - 1
    • Replies - 2
    • Total Posts - 3

    Hi,
    I need to modify a custom zoom capability. But my concern is that custom zoom capability supports only integer values whereas I need to support both integer as well as floating point values.Can i change the data type for the ICAP_ZOOMFACTOR capability or do i need to define my own custom capabilty for it.

    September 27, 2007 at 11:13 am #24150 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    If you change the size of the dataType I’d say you need to define a customCap, but doesn’t this depend on your interpetation of Icap_ZoomFactor == 1, and on your presicion requirements?

    When I initially read your question I think this sounds like a good place for a customCap, but if you could be happy with the range and presicion of a 16bit floating point value then maybe you don’t need a custom cap.

    It doesn’t seem to me that the spec defines what setting icap_zoomfactor to 1 means (or 65535 for that matter).
    Depending on the precision you’re targeting you *might* be able to defend the argument that you choose to interpret tw_int16 as (internally) Fix16.

    It may make your value(s) look odd and may not get you invited to next twain develops luau, but as long as you limit yourself to just using the 16 bits of tw_int16, your interpretation of the value is pretty much up to you.

    That said, I don’t think implementing icap_zoomFactor’s tw_int16 as a Fix16 is very intuitive but then again this is twain so …

    .

    September 27, 2007 at 11:20 am #24151 Reply
    Ishmeet
    Participant
    • Topics - 1
    • Replies - 2
    • Total Posts - 3

    so this means that if I can mange in the range of the capabilities data type then there is no need of defining a new capability. But if the data type is INT16 and I enter a FIX16 value, it would display as a BAD_VALUE. Then what should be done to avoid that. I am not sure that it would allow a floating point value for an int.

    September 27, 2007 at 11:31 am #24152 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    what|who would display BAD_VALUE? Isn’t this question in relation to a ds that you’re writing?

    September 27, 2007 at 11:45 am #24153 Reply
    Ishmeet
    Participant
    • Topics - 1
    • Replies - 2
    • Total Posts - 3

    TWAIN Specifications say that ICAP_ZOOMFACTOR has data type TW_INT 16. Now to allow user to enter floating point vales I would have to change this type to FIX. Otherwise when a flaoting point value would be entered the value would not be allowed as it type is float and allowed type is int. So for this I would need to change the data type of ICAP_ZOOMFACTOR to FIX, which is not in accordance with specification. Is this allowed???

    September 27, 2007 at 12:54 pm #24154 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    In reference with you opening somebody else’s ds or for someone to open yours? It comes back to the question; What does a current value of Icap_ZoomFactor == 1 mean?

    If you are an application writer, I would say you need to see what the vendor means by the (tw_int16) value for the cap.
    If you are a source writer, I would say that your ds *could* choose to interpret tw_int16 as fix16 – it just a matter of precision. If you need|want to provide 32bit floating point support then you should add a custom cap.

    In either case I think that only 16bits should be passed to (or accepted by) Icap_ZoomFactor, what that 16bit number means though is up to the ds writer (imo).

    .

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Customizing the zooming capability
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.