summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-03-05 15:16:37 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-03-05 15:16:37 +0000
commit1330ebbff8a31beb19d38b2a680625a19240a4f0 (patch)
tree2699dde2f80b46527b5dd40184efe3ac927529fa /fpdfsdk
parent40482e6f06eac0c5089e44df2d62881127eeeb3e (diff)
downloadpdfium-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 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdfedit_embeddertest.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/fpdfsdk/fpdfedit_embeddertest.cpp b/fpdfsdk/fpdfedit_embeddertest.cpp
index 8754a665f7..3fc6cae8b4 100644
--- a/fpdfsdk/fpdfedit_embeddertest.cpp
+++ b/fpdfsdk/fpdfedit_embeddertest.cpp
@@ -1131,12 +1131,11 @@ TEST_F(FPDFEditEmbeddertest, ExtractJBigImageBitmap) {
FPDF_PAGEOBJECT obj = FPDFPage_GetObject(page, 0);
ASSERT_EQ(FPDF_PAGEOBJ_IMAGE, FPDFPageObj_GetType(obj));
{
- // TODO(bug_945): This should return a valid bitmap. This test should be
- // able to successfully check |bitmap| using FPDFBitmap_GetFormat() and
- // CompareBitmap().
std::unique_ptr<void, FPDFBitmapDeleter> bitmap(
FPDFImageObj_GetBitmap(obj));
- ASSERT_FALSE(bitmap);
+ ASSERT_TRUE(bitmap);
+ EXPECT_EQ(FPDFBitmap_Gray, FPDFBitmap_GetFormat(bitmap.get()));
+ CompareBitmap(bitmap.get(), 1152, 720, "3f6a48e2b3e91b799bf34567f55cb4de");
}
UnloadPage(page);