This commit is contained in:
cnwhy
2018-07-24 17:28:43 +08:00
parent e1d897bca3
commit a98b9e1129
15 changed files with 105 additions and 6413 deletions
-14
View File
@@ -1,14 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>qrcode-decode</title>
</head>
<body>
<input type="file" name="file" id="file"><br>
<div></div>
</body>
<script type="text/javascript" src="/test.b0eca09c.js"></script>
</html>
+8 -9
View File
@@ -4,10 +4,10 @@
* Released under the ISC License.
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.qrDecode = {})));
}(this, (function (exports) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.qrDecode = factory());
}(this, (function () { 'use strict';
function AlignmentPattern(posX, posY, estimatedModuleSize) {
this.x = posX;
@@ -3007,8 +3007,9 @@
var decodeByDom = function decodeByDom(dom) {
var canvas = document.createElement("canvas");
var ctx = canvas.getContext('2d');
canvas.width = dom.width;
canvas.height = dom.height;
var isVideo = dom.tagName == 'VIDEO';
canvas.width = isVideo ? dom.videoWidth : dom.width;
canvas.height = isVideo ? dom.videoHeight : dom.height;
ctx.drawImage(dom, 0, 0, canvas.width, canvas.height);
var data = ctx.getImageData(0, 0, canvas.width, canvas.height);
return QRDecode(data);
@@ -3034,8 +3035,6 @@
QRDecode.decodeByUrl = decodeByUrl;
var browser = QRDecode;
exports.default = browser;
Object.defineProperty(exports, '__esModule', { value: true });
return browser;
})));
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
-3040
View File
File diff suppressed because one or more lines are too long
-7
View File
File diff suppressed because one or more lines are too long
-1
View File
File diff suppressed because one or more lines are too long
-3302
View File
File diff suppressed because one or more lines are too long
-1
View File
File diff suppressed because one or more lines are too long