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

A question about image resolution

Forums › TWAIN Classic › A question about image resolution

  • This topic has 1 reply, 2 voices, and was last updated 11 years, 11 months ago by jimwatters.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • February 10, 2009 at 12:03 pm #22463 Reply
    ChrisA2107
    Participant
    • Topics - 1
    • Replies - 0
    • Total Posts - 1

    When scanning using TWAIN, my software currently takes the image resolution of the scanned image from the BITMAPHEADERINFO in the returned DIB.

    This has worked fine up until now.

    However, I have recently tried the software on a scanner (Solar Imaging M5) where the correct resolution was NOT stored here.

    After investigation, the correct resolution (226dpi) was returned by querying the TWAIN driver with the DG_IMAGE / DAT_IMAGEINFO / MSG_GET operation triplet.

    So the question is, if this value is different to the resolution contained in the BITMAPHEADERINFO, which value should I take as being correct?

    Also, would it be considered a bug in the TWAIN driver that the DIB does not contain the correct resolution (it actually contains a resolution of 583115590 pixels/m = 14811166 dpi)

    Any advice on this is greatly appreciated.

    February 10, 2009 at 3:55 pm #24803 Reply
    jimwatters
    Participant
    • Topics - 2
    • Replies - 72
    • Total Posts - 74

    Yes the proper method to get resolution is with DG_IMAGE / DAT_IMAGEINFO / MSG_GET operation triplet.

    This triplet should always be used to determine what kind image image data is returned prior to every transfer.

    Requesting the scanner for a pixel type, bit depth, or a resolution, is only a request. It is not guaranteed that is what you will get. Some scanners offer an automatic color detection. They might return jpeg compressed data for color images and G4 compressed data for b&W pages. (But no TWAIN driver should return compressed data unless requested by the application)

    Yes it would be a bug with this TWAIN driver if the DIB does not contain the correct resolution.

    Regards,
    Jim Watters

    **************************************************
    JFL Peripheral Solutions Inc.
    http://www.jflinc.com/
    Your Expert Source of Custom Software and Services
    for TWAIN Applications, Data Sources,
    Peripheral Drivers and Support Software.
    **************************************************

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: A question about image resolution
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.