summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfview_c_api_test.c
diff options
context:
space:
mode:
authorJane Liu <janeliulwq@google.com>2017-08-02 21:45:57 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-03 20:20:02 +0000
commit28fb7ba083dba5e09493fd37a11994de51527dfc (patch)
treede009c28d419bed2a9a123c257f923893db0b053 /fpdfsdk/fpdfview_c_api_test.c
parent844d5dac8a6c97b2cd3bd92bf07d0cc62158408a (diff)
downloadpdfium-28fb7ba083dba5e09493fd37a11994de51527dfc.tar.xz
APIs and tests for extracting bitmaps from image objects
Added FPDFImageObj_GetBitmap() that returns the bitmap of an image object, and a FPDFBitmap_GetFormat() that returns the format of a bitmap. * Fixed a small bitmap conversion bug in cfx_dibsource.cpp. * Enabled EmbedderTest::CompareBitmap() to support different formats of bitmaps. * Added an embedder test and a test PDF file with images of many different formats. Bug=pdfium:677 Change-Id: I6a72f9d969cf5f3577db9400ca33197c213622ed Reviewed-on: https://pdfium-review.googlesource.com/9690 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Jane Liu <janeliulwq@google.com>
Diffstat (limited to 'fpdfsdk/fpdfview_c_api_test.c')
-rw-r--r--fpdfsdk/fpdfview_c_api_test.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fpdfsdk/fpdfview_c_api_test.c b/fpdfsdk/fpdfview_c_api_test.c
index 7d42be8792..e47f4d172c 100644
--- a/fpdfsdk/fpdfview_c_api_test.c
+++ b/fpdfsdk/fpdfview_c_api_test.c
@@ -132,6 +132,7 @@ int CheckPDFiumCApi() {
CHK(FPDFImageObj_LoadJpegFileInline);
CHK(FPDFImageObj_SetMatrix);
CHK(FPDFImageObj_SetBitmap);
+ CHK(FPDFImageObj_GetBitmap);
CHK(FPDFPageObj_CreateNewPath);
CHK(FPDFPageObj_CreateNewRect);
CHK(FPDFPath_SetStrokeColor);
@@ -302,6 +303,7 @@ int CheckPDFiumCApi() {
CHK(FPDF_PageToDevice);
CHK(FPDFBitmap_Create);
CHK(FPDFBitmap_CreateEx);
+ CHK(FPDFBitmap_GetFormat);
CHK(FPDFBitmap_FillRect);
CHK(FPDFBitmap_GetBuffer);
CHK(FPDFBitmap_GetWidth);