Index: core/fpdfapi/page/cpdf_streamcontentparser.cpp |
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp |
index 7f20b227b61b56c9aa1637498ec0a9c65fc37b44..4ad763e3b2338c4a6e3511cb736c6d59beafeb55 100644 |
--- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp |
+++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp |
@@ -669,7 +669,11 @@ void CPDF_StreamContentParser::Handle_ExecuteXObject() { |
type = pXObject->GetDict()->GetStringFor("Subtype"); |
if (type == "Image") { |
- CPDF_ImageObject* pObj = AddImage(pXObject->GetObjNum()); |
+ CPDF_ImageObject* pObj = |
+ pXObject->IsInline() |
+ ? AddImage(UniqueStream(ToStream(pXObject->Clone()))) |
+ : AddImage(pXObject->GetObjNum()); |
+ |
m_LastImageName = name; |
m_pLastImage = pObj->GetImage(); |
if (!m_pObjectHolder->HasImageMask()) |