Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

New OpenSource Image Scanning (Twain/Sane) Framework Found

807589Feb 6 2004 — edited Sep 22 2008
Hy all

I found a very very useful scanning framework which is licenced under the BSD license. This library works on windows as linux and some other unixes. Look at http://www.mms-computing.co.uk/ . Download the jar file and run it first java -jar <jarfile>. This comiles the classes and other c-objects.
I'm not the developper of this software but as I searched for a similar tool, if found just expensive ones and i saw that some others has been searched for Twain/Sane tools. So here it is.

Roland

It can be very easely used. Look at the following code construct.

public class ImageTab extends JPanel implements ScannerListener{

public ImageTab(){

Scanner scanner=Scanner.getDevice();
if(scanner!=null){
scanner.addListener(this);
add(scanner.getScanGUI());
}
.
.
.
}

public void update(ScannerIOMetadata.Type type, final ScannerIOMetadata metadata){
if(type.equals(ScannerIOMetadata.ACQUIRED)){
BufferedImage img=metadata.getImage();
.
. do what you have to do
.
}else if(type.equals(ScannerIOMetadata.STATECHANGE)){
switch(metadata.getState()){
.
. do what you have to do
.
}
Log.msg("Scanner State "+metadata.getStateStr());
}else if(type.equals(ScannerIOMetadata.INFO)){
Log.msg(metadata.getInfo());
}else if(type.equals(ScannerIOMetadata.EXCEPTION)){
Log.err(metadata.getException());
}
}
}


Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 20 2008
Added on Feb 6 2004
8 comments
1,484 views