summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page')
-rw-r--r--core/fpdfapi/page/cpdf_streamcontentparser.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
index 692de0f5eb..1e6bf6c3c8 100644
--- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
@@ -658,7 +658,11 @@ void CPDF_StreamContentParser::Handle_BeginImage() {
break;
}
}
- AddImage(std::move(pStream));
+ CPDF_ImageObject* pObj = AddImage(std::move(pStream));
+ // Record the bounding box of this image, so rendering code can draw it
+ // properly.
+ if (pObj->GetImage()->IsMask())
+ m_pObjectHolder->AddImageMaskBoundingBox(pObj->GetRect());
}
void CPDF_StreamContentParser::Handle_BeginMarkedContent() {