Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/input_stream.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const GetPixels = require("get-pixels");
const getPixels = require("get-pixels");

var InputStream = {};

Expand All @@ -22,12 +22,12 @@ InputStream.createImageStream = function() {
_topRight = {x: 0, y: 0},
_canvasSize = {x: 0, y: 0};

function loadImages() {
function loadImages(callback) {
loaded = false;
GetPixels(baseUrl, _config.mime, function(err, pixels) {
getPixels(baseUrl, _config.mime, function (err, pixels) {
if (err) {
console.log(err);
exit(1);
return callback(err);
}
loaded = true;
console.log(pixels.shape);
Expand Down Expand Up @@ -84,11 +84,11 @@ InputStream.createImageStream = function() {
return height;
};

that.setInputStream = function(stream) {
that.setInputStream = function(stream, callback) {
_config = stream;
baseUrl = _config.src;
size = 1;
loadImages();
loadImages(callback);
};

that.ended = function() {
Expand Down
29 changes: 20 additions & 9 deletions lib/quagga.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.