Forums › TWAIN Classic › Image Aquire Problems › Reply To: Image Aquire Problems
February 12, 2010 at 7:13 pm
#24686
I do not know to help you in your code. But if you can use Morena Image Acquisition Framework for Java (http://www.gnome.sk), you can try the following code design:
TwainSource source=TwainManager.selectSource(null);
if (source!=null)
{ source.setFeederEnabled(true);
source.setAutoFeed(true);
source.setTransferCount(5);
int count=1;
do
{ MorenaImage image=new MorenaImage(source);
System.err.println("Size of acquired image "+(count++)+" is "
+image.getWidth()+" x "
+image.getHeight()+" x "
+image.getPixelSize());
}
while (source.hasMoreImages());
}
TwainManager.close();
Morena is a commercial product, but it is free of charge for educational and personal home usage.
Martin Motovsky
Member of Gnome’s technical support