get_SaneResolution Method
In This Topic
Gets image resolution of SANE device.
Syntax
var instance = new Vintasoft.Twain.WebTwainDeviceJS(deviceName, productFamily, manufacturer, driverVersion, twainVersion, deviceManager, is64Bit);
var value; // Type: number
value = instance.get_SaneResolution();
function get_SaneResolution() : number;
Return Value
Resolution of images for current scan session.
Exceptions
Exception | Description |
| Thrown if device is not opened OR error occurs during getting value of device capability. |
Example
// Gets scan resolution of opened SANE device.
function getSaneScanResolution(saneDevice) {
try {
console.log("SANE device: " + saneDevice.get_DeviceName());
// if SANE device is not opened
if (!saneDevice.get_IsOpened()) {
console.log("Device is not opened. Please open device.");
return;
}
console.log("Scan resolution: " + saneDevice.get_SaneResolution());
}
catch (ex) {
alert(ex);
}
}
Browser Compatibility
See Also