DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2003

    Thumbs up Connecting to scanner/camera from java application can be easy

    For those who need to take an image from a camera or scanner and are willing to do it directly from a java apllication:
    There is the Java Twain Package at http://www.gnome.sk which is very intuitive to use. To find out, how this package works with your scanner or camera, it's enough to have Java (1.2 and higher) and a scanner or camera installed on your computer.
    To test, how the package works with your scanner/camera, download the Java Twain trial version from
    http://www.gnome.sk/products_jtp_try&buy.html .
    Unzipp it and go to the examples directory off the unzipped package.
    There, doubleclick the runExample.bat file ( or runExampleShow.sh if you are in MacOS) .
    This will pop up the Twain Source Selection user interface. There, all your
    scanners which do have a MacOS twain drivers should be listed.
    Select one of them.
    The user interface of the selected scanner will appear.
    Confirm the scanning (you can set the scanning parameters first).
    The scanned image will be displayed in a separate window.
    To end the application, close that window.

    You can try other examples to see how to hide a user interface, how to save the scanned image, how to use ADF, ....
    The online tutorial can be of great help too.


  2. #2
    Join Date
    Mar 2003
    The download link of the Java Twain package has changed to:


  3. #3
    Join Date
    Mar 2003
    The Java Twain Package has been renamed to Morena. Many usefull new features were added:
    - AutomatedTest: a program for testing all get, set and getDefault methods. It creates a file containing all information about the capabilities of you scanner's (camera's) twain driver
    - the resultCode and conditionCode in the debug log are descriptive instead of the original numerical ones
    - ExampleShowAdvanced: demonstrates how to scan an image using defaults from the Twain source with better image source cancel/error handling.
    - ExampleConsumer: demonstrates how to use a bespoke ImageConsumer to become independent on Morena
    - setBuffer methods: enable you to alocate a buffer greater than one line, you can alocate a buffer for the whole image

    Visit http://www.gnome.sk for more information


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.