-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathtest.js
21 lines (20 loc) · 930 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const dbr = require('./index.js');
dbr.initLicense("DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAxLTE2NDk4Mjk3OTI2MzUiLCJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSIsInNlc3Npb25QYXNzd29yZCI6IndTcGR6Vm05WDJrcEQ5YUoifQ==");
dbr.decodeFileAsync("images/test.tif", dbr.formats.ALL, function (err, msg) {
console.log(msg);
for (index in msg) {
result = msg[index];
console.log('Format: ' + result['format']);
console.log('Value : ' + result['value']);
console.log('x1: ' + result['x1']);
console.log('y1 : ' + result['y1']);
console.log('x2: ' + result['x2']);
console.log('y2 : ' + result['y2']);
console.log('x3: ' + result['x3']);
console.log('y3: ' + result['y3']);
console.log('x4: ' + result['x4']);
console.log('y4: ' + result['y4']);
console.log('page: ' + result['page']);
console.log('decoding time: ' + result['time']);
}
}, "");