1 2 3 | /* Property */ /* Scan pages in 200 DPI */ DWObject.Resolution = 200; |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | // Method /// < summary > /// Rotates the image of a specified index in buffer by a specified angle. /// </ summary > /// < param name = "sImageIndex" type = "short" data-filtered = "filtered" > specifies the index of image in buffer. The index is 0-based. /// < param name = "fAngle" type = "float" data-filtered = "filtered" > specifies the angle. /// < param name = "bKeepSize" type = "bool" data-filtered = "filtered" > specifies whether to keep the original size /// < returns type = "bool" data-filtered = "filtered" ></ returns > DWObject.Rotate(0, 45, false); // rotate the 1st image in the buffer by 45 degrees |
1 2 3 4 5 6 7 8 9 10 11 12 13 | < script type = "text/javascript" data-filtered = "filtered" > Dynamsoft.WebTwainEnv.RegisterEvent('OnWebTwainReady', Dynamsoft_OnReady); var DWObject; /* OnWebTwainReady event fires as soon as Dynamic Web TWAIN is initialized and ready to be used. It is the best place to add event listeners */ function Dynamsoft_OnReady() { DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer'); DWObject.RegisterEvent("OnPostTransfer", Dynamsoft_OnPostTransfer); } function Dynamsoft_OnPostTransfer() { /* This event OnPostTransfer will be triggered after a transfer ends. */ /* your code goes here*/ } </ script > |
1 2 3 4 5 6 7 8 9 10 | < script type = "text/javascript" data-filtered = "filtered" > Dynamsoft.WebTwainEnv.RegisterEvent('OnWebTwainReady', Dynamsoft_OnReady); var DWObject; function Dynamsoft_OnReady() { DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer'); DWObject.RegisterEvent("OnPostTransfer", function() { /* your code goes here*/ }); } </ script > |
1 2 | /* sImageIndex is the index of the image you clicked on*/ OnMouseClick(short sImageIndex) |
1 2 3 | function DynamicWebTwain_OnMouseClick(index) { CurrentImage.value = index + 1; } |
1 2 3 | DWObject.RegisterEvent("OnPostTransfer", function(index) { CurrentImage.value = index + 1; }); |
1 2 3 4 5 6 7 | < script type = "text/javascript" data-filtered = "filtered" > Dynamsoft.WebTwainEnv.RegisterEvent('OnWebTwainReady', Dynamsoft_OnReady); var DWObject; function Dynamsoft_OnReady() { DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer'); } </ script > |
1 2 3 4 5 | < script type = "text/javascript" data-filtered = "filtered" > Dynamsoft.WebTwainEnv.RegisterEvent('OnWebTwainReady', function() { DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer'); }); </ script > |
本次教程到此结束,希望能对Dynamic Web TWAIN的用户带来帮助,接下来还会有更多的相关教程,敬请期待!
如今手机应用市场越来越大,其中创新、独特的产品也越来越多。APP市场最好的地方就是无论是iTunes还是Google Play中,你都有平等的机会参与竞争和获得成功。这是一个公平的竞争环境,吸引着无数优质的开发商。专家们已经预测,APP市场在2020年将翻一番,价值可以达到101亿美元。
无论你是一个多优秀的开发者,在开始新的APP应用时也应该注意一些事情。在启动一个APP项目时你应该记住和经过几个重要的步骤来确保它能成功。
Socket {
connecting: false,
_hadError: false,
_handle:
TCP {
bytesRead: 0,
_externalStream: {},
fd: -1,
reading: true,
owner: [Circular],
onread: [Function: onread],
onconnection: null,
writeQueueSize: 0 },
_parent: null,
_host: null,
JuliusJS 是使用JavaScript实现的一个语音识别库
它可以识别用户所说的内容,然后立即翻译出来,声音->文字 PS: 通过一个回调函数,示例代码:
// bootstrap JuliusJS var julius = new Julius(); julius.onrecognition = function(sentence) { console.log(sentence); }; // say "Hello, world!" // console logs: `> HELLO WORLD`