|
|
|
@ -942,7 +942,8 @@ var JpegStream = (function JpegStreamClosure() {
@@ -942,7 +942,8 @@ var JpegStream = (function JpegStreamClosure() {
|
|
|
|
|
JpegStream.prototype.isNativelySupported = |
|
|
|
|
function JpegStream_isNativelySupported(xref, res) { |
|
|
|
|
var cs = ColorSpace.parse(this.dict.get('ColorSpace', 'CS'), xref, res); |
|
|
|
|
return cs.name === 'DeviceGray' || cs.name === 'DeviceRGB'; |
|
|
|
|
return (cs.name === 'DeviceGray' || cs.name === 'DeviceRGB') && |
|
|
|
|
cs.isDefaultDecode(this.dict.get('Decode', 'D')); |
|
|
|
|
}; |
|
|
|
|
/** |
|
|
|
|
* Checks if the image can be decoded by the browser. |
|
|
|
@ -950,8 +951,8 @@ var JpegStream = (function JpegStreamClosure() {
@@ -950,8 +951,8 @@ var JpegStream = (function JpegStreamClosure() {
|
|
|
|
|
JpegStream.prototype.isNativelyDecodable = |
|
|
|
|
function JpegStream_isNativelyDecodable(xref, res) { |
|
|
|
|
var cs = ColorSpace.parse(this.dict.get('ColorSpace', 'CS'), xref, res); |
|
|
|
|
var numComps = cs.numComps; |
|
|
|
|
return numComps === 1 || numComps === 3; |
|
|
|
|
return (cs.numComps === 1 || cs.numComps === 3) && |
|
|
|
|
cs.isDefaultDecode(this.dict.get('Decode', 'D')); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
return JpegStream; |
|
|
|
|