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

Bug in newest Twacker 11/22/2011

Forums › TWAIN Classic › Bug in newest Twacker 11/22/2011

  • This topic has 1 reply, 2 voices, and was last updated 9 years ago by peterp.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • November 22, 2011 at 3:27 pm #22718 Reply
    Travis
    Participant
    • Topics - 3
    • Replies - 1
    • Total Posts - 4

    Not sure where to report bugs about the sample applications.

    In the file DCA_ACQ.C in the function “static void DoMemTransfer(HWND hWnd)” there is the calculation to populate the BITMAPINFOHEADER.biXPelsPerMeter. This calculation is incorrect for the case of TWUN_INCHES:

    Incorrect Code (currently being distributed)
    pdib->bmiHeader.biXPelsPerMeter = (LONG)((XRes*2.54)*100);
    pdib->bmiHeader.biYPelsPerMeter = (LONG)((YRes*2.54)*100);

    Corrected Code:
    pdib->bmiHeader.biXPelsPerMeter = (LONG)((XRes/2.54)*100);
    pdib->bmiHeader.biYPelsPerMeter = (LONG)((YRes/2.54)*100);

    or you can change it to this:
    pdib->bmiHeader.biXPelsPerMeter = (LONG)((XRes*39.3700787)*100);
    pdib->bmiHeader.biYPelsPerMeter = (LONG)((YRes*39.3700787)*100);

    Line numbers are 1422 and 1423.

    January 12, 2012 at 9:00 pm #25499 Reply
    peterp
    Participant
    • Topics - 0
    • Replies - 30
    • Total Posts - 30

    Thanks for reporting that. It will be fixed in the next update of the sample source code.

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Bug in newest Twacker 11/22/2011
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.