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

Reply To: How to set the resolution (DPI)?

Forums › TWAIN Classic › How to set the resolution (DPI)? › Reply To: How to set the resolution (DPI)?

February 12, 2010 at 7:04 pm #24006
mmotovsk
Participant
  • Topics - 3
  • Replies - 13
  • Total Posts - 16

I am using the following code with JTwain to try to set the DPI to 499 x 499 but the resulting scanned image has 96 x 96 DPI. How can I set the resolution?

Try the following code from Morena – Image Acquisition Framework for Java (http://www.gnome.sk):


TwainSource source=TwainManager.selectSource(null);
source.setVisible(false);
source.setGrayScaleMode();
source.setResolution(499);
MorenaImage image=new MorenaImage(source);
System.err.println("Size of acquired image is "+
+image.getWidth()+" x "
+image.getHeight()+" x "
+image.getPixelSize());

TwainManager.close();

You can also run TwainAutomatedTest.java (test.bat, test.sh located at the examples directory of the distribution package). It will write all supported capabilities of your Twain driver to the twainAutomatedTest.txt file. You can see there for the interval of the supported resolutions.

Martin Motovsky
Member of Gnome’s technical support

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