summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_image.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page/cpdf_image.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_image.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/fpdfapi/page/cpdf_image.cpp b/core/fpdfapi/page/cpdf_image.cpp
index 8ce4185446..b74de62250 100644
--- a/core/fpdfapi/page/cpdf_image.cpp
+++ b/core/fpdfapi/page/cpdf_image.cpp
@@ -331,7 +331,13 @@ RetainPtr<CFX_DIBSource> CPDF_Image::LoadDIBSource() const {
if (!source->Load(m_pDocument.Get(), m_pStream.Get()))
return nullptr;
- return source;
+ if (!source->IsJBigImage())
+ return source;
+
+ CPDF_DIBSource::LoadState ret = CPDF_DIBSource::LoadState::kContinue;
+ while (ret == CPDF_DIBSource::LoadState::kContinue)
+ ret = source->ContinueLoadDIBSource(nullptr);
+ return ret == CPDF_DIBSource::LoadState::kSuccess ? source : nullptr;
}
RetainPtr<CFX_DIBSource> CPDF_Image::DetachBitmap() {