Rename JpegStreamIr to just JpegImage since it isn't

an IR.
This commit is contained in:
= 2011-10-20 12:18:24 -07:00
parent 2ad1e622ab
commit 1d66c0e895

10
pdf.js
View File

@ -897,8 +897,8 @@ var PredictorStream = (function predictorStream() {
return constructor; return constructor;
})(); })();
var JpegStreamIR = (function() { var JpegImage = (function() {
function JpegStreamIR(objId, IR, objs) { function JpegImage(objId, IR, objs) {
var src = 'data:image/jpeg;base64,' + window.btoa(IR); var src = 'data:image/jpeg;base64,' + window.btoa(IR);
// create DOM image // create DOM image
@ -915,13 +915,13 @@ var JpegStreamIR = (function() {
this.domImage = img; this.domImage = img;
} }
JpegStreamIR.prototype = { JpegImage.prototype = {
getImage: function() { getImage: function() {
return this.domImage; return this.domImage;
} }
}; };
return JpegStreamIR; return JpegImage;
})(); })();
// A JpegStream can't be read directly. We use the platform to render // A JpegStream can't be read directly. We use the platform to render
@ -4045,7 +4045,7 @@ var PDFDoc = (function() {
switch (objType) { switch (objType) {
case 'JpegStream': case 'JpegStream':
var IR = data[2]; var IR = data[2];
new JpegStreamIR(objId, IR, this.objs); new JpegImage(objId, IR, this.objs);
console.log('got image'); console.log('got image');
break; break;
case 'Font': case 'Font':