Decode more jpegs using the browser if possible.

This commit is contained in:
Brendan Dahl 2012-01-03 14:26:19 -08:00
parent c0cf081ec0
commit 3c2a0f11b1
3 changed files with 36 additions and 22 deletions

View file

@ -211,7 +211,8 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
args = [objId, w, h];
var softMask = dict.get('SMask', 'IM') || false;
if (!softMask && image instanceof JpegStream && image.isNative) {
if (!softMask && image instanceof JpegStream &&
image.isNativelySupported(xref, resources)) {
// These JPEGs don't need any more processing so we can just send it.
fn = 'paintJpegXObject';
handler.send('obj', [objId, 'JpegStream', image.getIR()]);