Index: core/fpdfapi/fpdf_page/fpdf_page_doc.cpp |
diff --git a/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp b/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp |
index f8d75753186707ab7e0dc17aee5062ac8ed92927..fa242ffb857f0c74801dba1fc6f205845aba7566 100644 |
--- a/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp |
+++ b/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp |
@@ -406,10 +406,8 @@ CPDF_Image* CPDF_DocPageData::GetImage(CPDF_Object* pImageStream) { |
if (it != m_ImageMap.end()) |
return it->second->AddRef(); |
- CPDF_Image* pImage = new CPDF_Image(m_pPDFDoc); |
- pImage->LoadImageF(pImageStream->AsStream(), false); |
- |
- CPDF_CountedImage* pCountedImage = new CPDF_CountedImage(pImage); |
+ CPDF_CountedImage* pCountedImage = new CPDF_CountedImage( |
+ new CPDF_Image(m_pPDFDoc, pImageStream->AsStream(), false)); |
m_ImageMap[dwImageObjNum] = pCountedImage; |
return pCountedImage->AddRef(); |
} |