|
|
@ -958,12 +958,13 @@ var JpegImage = (function JpegImageClosure() { |
|
|
|
return data; |
|
|
|
return data; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_isColorConversionNeeded: function isColorConversionNeeded() { |
|
|
|
_isColorConversionNeeded() { |
|
|
|
if (this.adobe && this.adobe.transformCode) { |
|
|
|
if (this.adobe) { |
|
|
|
// The adobe transform marker overrides any previous setting
|
|
|
|
// The adobe transform marker overrides any previous setting.
|
|
|
|
return true; |
|
|
|
return !!this.adobe.transformCode; |
|
|
|
} else if (this.numComponents === 3) { |
|
|
|
} |
|
|
|
if (!this.adobe && this.colorTransform === 0) { |
|
|
|
if (this.numComponents === 3) { |
|
|
|
|
|
|
|
if (this.colorTransform === 0) { |
|
|
|
// If the Adobe transform marker is not present and the image
|
|
|
|
// If the Adobe transform marker is not present and the image
|
|
|
|
// dictionary has a 'ColorTransform' entry, explicitly set to `0`,
|
|
|
|
// dictionary has a 'ColorTransform' entry, explicitly set to `0`,
|
|
|
|
// then the colours should *not* be transformed.
|
|
|
|
// then the colours should *not* be transformed.
|
|
|
@ -972,7 +973,7 @@ var JpegImage = (function JpegImageClosure() { |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
// `this.numComponents !== 3`
|
|
|
|
// `this.numComponents !== 3`
|
|
|
|
if (!this.adobe && this.colorTransform === 1) { |
|
|
|
if (this.colorTransform === 1) { |
|
|
|
// If the Adobe transform marker is not present and the image
|
|
|
|
// If the Adobe transform marker is not present and the image
|
|
|
|
// dictionary has a 'ColorTransform' entry, explicitly set to `1`,
|
|
|
|
// dictionary has a 'ColorTransform' entry, explicitly set to `1`,
|
|
|
|
// then the colours should be transformed.
|
|
|
|
// then the colours should be transformed.
|
|
|
|