1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 09:38:06 +02:00

Uses blob URL instead of data when possible

This commit is contained in:
Yury Delendik 2013-11-11 22:25:03 -06:00 committed by Yury
parent 4ce6cb8b0f
commit c8af2565f1
3 changed files with 34 additions and 8 deletions

View file

@ -15,7 +15,7 @@
* limitations under the License.
*/
/* globals bytesToString, ColorSpace, Dict, EOF, error, info, Jbig2Image,
JpegImage, JpxImage, Lexer, Util */
JpegImage, JpxImage, Lexer, Util, PDFJS */
'use strict';
@ -832,7 +832,7 @@ var JpegStream = (function JpegStreamClosure() {
}
};
JpegStream.prototype.getIR = function JpegStream_getIR() {
return bytesToString(this.bytes);
return PDFJS.createObjectURL(this.bytes, 'image/jpeg');
};
/**
* Checks if the image can be decoded and displayed by the browser without any