diff options
author | Lei Zhang <thestig@chromium.org> | 2018-03-05 15:16:37 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-03-05 15:16:37 +0000 |
commit | 1330ebbff8a31beb19d38b2a680625a19240a4f0 (patch) | |
tree | 2699dde2f80b46527b5dd40184efe3ac927529fa /core/fpdfapi/render/cpdf_dibsource.cpp | |
parent | 40482e6f06eac0c5089e44df2d62881127eeeb3e (diff) | |
download | pdfium-1330ebbff8a31beb19d38b2a680625a19240a4f0.tar.xz |
Make FPDFBitmap_GetFormat() work for JBIG images.
BUG=pdfium:945
Change-Id: I2a880e747b6f5a2fabed4d34ce47b69ff589ce3f
Reviewed-on: https://pdfium-review.googlesource.com/27814
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/render/cpdf_dibsource.cpp')
-rw-r--r-- | core/fpdfapi/render/cpdf_dibsource.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/fpdfapi/render/cpdf_dibsource.cpp b/core/fpdfapi/render/cpdf_dibsource.cpp index 8a752374b6..3c8d471767 100644 --- a/core/fpdfapi/render/cpdf_dibsource.cpp +++ b/core/fpdfapi/render/cpdf_dibsource.cpp @@ -708,6 +708,10 @@ RetainPtr<CPDF_DIBSource> CPDF_DIBSource::DetachMask() { return std::move(m_pMask); } +bool CPDF_DIBSource::IsJBigImage() const { + return m_pStreamAcc->GetImageDecoder() == "JBIG2Decode"; +} + CPDF_DIBSource::LoadState CPDF_DIBSource::StartLoadMaskDIB() { m_pMask = pdfium::MakeRetain<CPDF_DIBSource>(); LoadState ret = m_pMask->StartLoadDIBSource( |