Merge pull request #11847 from Snuffleupagus/move-maybeValidDimensions
Move the `maybeValidDimensions` check, used with JPEG images, to occur earlier (PR 11523 follow-up)
This commit is contained in:
commit
bf416db23d
@ -549,13 +549,13 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
!softMask &&
|
||||
!mask &&
|
||||
image instanceof JpegStream &&
|
||||
image.maybeValidDimensions &&
|
||||
NativeImageDecoder.isSupported(
|
||||
image,
|
||||
this.xref,
|
||||
resources,
|
||||
this.pdfFunctionFactory
|
||||
) &&
|
||||
image.maybeValidDimensions
|
||||
)
|
||||
) {
|
||||
// These JPEGs don't need any more processing so we can just send it.
|
||||
return this.handler
|
||||
|
@ -36,13 +36,13 @@ class NativeImageDecoder {
|
||||
canDecode(image) {
|
||||
return (
|
||||
image instanceof JpegStream &&
|
||||
image.maybeValidDimensions &&
|
||||
NativeImageDecoder.isDecodable(
|
||||
image,
|
||||
this.xref,
|
||||
this.resources,
|
||||
this.pdfFunctionFactory
|
||||
) &&
|
||||
image.maybeValidDimensions
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user