Skip to content

Commit

Permalink
switch to pdfjs-dist jpeg decoder
Browse files Browse the repository at this point in the history
  • Loading branch information
hipstersmoothie committed Aug 16, 2018
1 parent 4f1b10c commit 89fb5a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion UTIF.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ if (typeof module == "object") {module.exports = UTIF;}
else {self.UTIF = UTIF;}

var pako, JpegDecoder;
if (typeof require == "function") {pako = require("pako"); JpegDecoder = require("jpgjs").JpegDecoder;}
if (typeof require == "function") {pako = require("pako"); JpegDecoder = require('pdfjs-dist/lib/core/jpg')
.JpegImage;}
else {pako = self.pako; JpegDecoder = self.JpegDecoder;}

function log() { if (typeof process=="undefined" || process.env.NODE_ENV=="development") console.log.apply(console, arguments); }
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
],
"dependencies": {
"jpgjs": "github:makr28/jpgjs",
"pako": "^1.0.5"
"pako": "^1.0.5",
"pdfjs-dist": "^2.0.489"
}
}

0 comments on commit 89fb5a9

Please sign in to comment.