getSupportedEsclScanColorModes Метод
В этом разделе
Возвращает поддерживаемые цветовые режимы сканирования открытого устройства eSCL.
Синтаксис
var instance = new Vintasoft.Twain.WebTwainDeviceJS(deviceName, productFamily, manufacturer, driverVersion, twainVersion, deviceManager, is64Bit);
var value; // Type: Vintasoft.Twain.WebEsclScanColorModeEnumJS[]
value = instance.getSupportedEsclScanColorModes();
Return Value
Массив, содержащий поддерживаемые цветовые режимы сканирования устройства eSCL.
Исключения
Исключение | Описание |
| Выбрасывается, если устройство не открыто ИЛИ возникает ошибка при получении значения возможностей устройства. |
Пример
// Gets information about supported scan color modes of opened eSCL device.
function getSupportedEsclScanColorModes(esclDevice) {
try {
console.log("eSCL device: " + esclDevice.get_DeviceName());
// if SANE device is not opened
if (!esclDevice.get_IsOpened()) {
console.log("Device is not opened. Please open device.");
return;
}
// get information about supported scan color modes of eSCL device
var esclScanColorModes = esclDevice.getSupportedEsclScanColorModes();
console.log("Supported scan color modes:");
// for each supported scan color mode
for (var i = 0; i < esclScanColorModes.length; i++) {
// output information about scan color mode
console.log("- " + esclScanColorModes[i]);
}
}
catch (ex) {
alert(ex);
}
}
Совместимость с веб браузерами
Смотрите также