summaryrefslogtreecommitdiff
path: root/testing/image_diff/image_diff_png.h
diff options
context:
space:
mode:
authorJane Liu <janeliulwq@google.com>2017-08-03 16:29:17 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-03 21:54:42 +0000
commitb35dbadce21f684619377ce545e066de6494a441 (patch)
treebad1544256fb9701e1188cbaa02d85e3bb22898d /testing/image_diff/image_diff_png.h
parent548334e57cae1039824d3db97bab5348fbe674e2 (diff)
downloadpdfium-b35dbadce21f684619377ce545e066de6494a441.tar.xz
Added testing flag --save-images that saves embedded images
1. Added --save-images flag in pdfium_test to save embedded images using FPDFImageObj_GetBitmap() API and the bitmap-to-png conversion tool. * Added support for bitmaps of other common color spaces in the bitmap-to-png conversion tool. Bug=pdfium:677 Change-Id: Ide29f51021695af0a1afb5205355f4b78b918d35 Reviewed-on: https://pdfium-review.googlesource.com/9710 Commit-Queue: Jane Liu <janeliulwq@google.com> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'testing/image_diff/image_diff_png.h')
-rw-r--r--testing/image_diff/image_diff_png.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/testing/image_diff/image_diff_png.h b/testing/image_diff/image_diff_png.h
index 4d87aa1cc0..b334b20453 100644
--- a/testing/image_diff/image_diff_png.h
+++ b/testing/image_diff/image_diff_png.h
@@ -18,6 +18,13 @@ bool DecodePNG(const unsigned char* input,
int* width,
int* height);
+// Encode a BGR pixel array into a PNG.
+bool EncodeBGRPNG(const unsigned char* input,
+ int width,
+ int height,
+ int row_byte_width,
+ std::vector<unsigned char>* output);
+
// Encode an RGBA pixel array into a PNG.
bool EncodeRGBAPNG(const unsigned char* input,
int width,
@@ -33,6 +40,13 @@ bool EncodeBGRAPNG(const unsigned char* input,
bool discard_transparency,
std::vector<unsigned char>* output);
+// Encode a grayscale pixel array into a PNG.
+bool EncodeGrayPNG(const unsigned char* input,
+ int width,
+ int height,
+ int row_byte_width,
+ std::vector<unsigned char>* output);
+
} // namespace image_diff_png
#endif // TESTING_IMAGE_DIFF_IMAGE_DIFF_PNG_H_