summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-03-05 15:03:37 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-03-05 15:03:37 +0000
commit40482e6f06eac0c5089e44df2d62881127eeeb3e (patch)
tree55e760468e422435acee4b10c1ca64faff5d87d4 /fpdfsdk
parentaa11f46e7bd846ef26d4cdd2be4f92f7a63d1cdb (diff)
downloadpdfium-40482e6f06eac0c5089e44df2d62881127eeeb3e.tar.xz
Use CPDF_DIBSource::LoadState enum class in more places.
Change-Id: Iaf124c1b1ceca86d220ae654d9d18af7475209b6 Reviewed-on: https://pdfium-review.googlesource.com/27870 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdfeditimg.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/fpdfsdk/fpdfeditimg.cpp b/fpdfsdk/fpdfeditimg.cpp
index 0d7ba56559..335c152546 100644
--- a/fpdfsdk/fpdfeditimg.cpp
+++ b/fpdfsdk/fpdfeditimg.cpp
@@ -290,11 +290,11 @@ FPDFImageObj_GetImageMetadata(FPDF_PAGEOBJECT image_object,
return true;
auto pSource = pdfium::MakeRetain<CPDF_DIBSource>();
- if (!pSource->StartLoadDIBSource(pPage->m_pDocument.Get(), pImg->GetStream(),
- false, nullptr,
- pPage->m_pPageResources.Get())) {
+ CPDF_DIBSource::LoadState ret = pSource->StartLoadDIBSource(
+ pPage->m_pDocument.Get(), pImg->GetStream(), false, nullptr,
+ pPage->m_pPageResources.Get());
+ if (ret == CPDF_DIBSource::LoadState::kFail)
return true;
- }
metadata->bits_per_pixel = pSource->GetBPP();
if (pSource->GetColorSpace())