I'm trying to setup Morena 7 in my java application, but i can't configure my scanner from my code, it ignores the settings i set.
Even though my scanner works with the example projects they provide with every supported setting. I have searched the web for explanations but i have found very little to none documentation.
This the code i use to scan, it is identical to sample given in the tutorial document :
public void scan() throws Exception {
Manager manager = Manager.getInstance();
List devices = manager.listDevices();
if(devices.isEmpty()) {
System.out.println("No scanners detected");
return;
}
Device device = (Device) devices.get(0);
if (device instanceof Scanner) {
Scanner scanner = (Scanner) device;
scanner.setMode(Scanner.RGB_8);
scanner.setResolution(75);
scanner.setFrame(100, 100, 500, 500);
BufferedImage bimage = SynchronousHelper.scanImage(scanner);
// Do the necessary processes with bimage
manager.close();
}
else {
System.out.println("Please Connect A Scanner");
}
}
When i run this code, i get back an image but with default values from the printer, every setting like color, resolution and scan area (frame) are ignored.