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:
parent
4ce6cb8b0f
commit
c8af2565f1
3 changed files with 34 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue