Add a pixel test for CFX_ImageTransformer.

Test CalcMono() and CalcColor().

Change-Id: Icd2a7cb8e7a4353f9cdb43679ce65a357bcf2e64
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/75750
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/testing/resources/pixel/image_transformer_other.in b/testing/resources/pixel/image_transformer_other.in
new file mode 100644
index 0000000..41bbd4a
--- /dev/null
+++ b/testing/resources/pixel/image_transformer_other.in
@@ -0,0 +1,129 @@
+{{header}}
+{{object 1 0}} <<
+  /Type /Catalog
+  /Pages 2 0 R
+>>
+endobj
+{{object 2 0}} <<
+  /Type /Pages
+  /Count 1
+  /Kids [3 0 R]
+>>
+endobj
+{{object 3 0}} <<
+  /Type /Page
+  /Parent 2 0 R
+  /Contents 4 0 R
+  /MediaBox [0 0 200 200]
+  /Resources <<
+    /ColorSpace <<
+      /CS0 5 0 R
+    >>
+    /XObject <<
+      /ImMonoPalette 6 0 R
+      /ImMono 7 0 R
+      /ImColor 8 0 R
+      /ImColorWithMask 9 0 R
+    >>
+  >>
+>>
+endobj
+{{object 4 0}} <<
+  {{streamlen}}
+>>
+stream
+q
+-16 64 64 0 20 20 cm
+/ImMonoPalette Do
+Q
+q
+16 64 64 0 120 20 cm
+/ImMono Do
+Q
+q
+16 64 64 16 20 120 cm
+/ImColor Do
+Q
+q
+16 64 -64 16 120 120 cm
+/ImColorWithMask Do
+Q
+endstream
+endobj
+{{object 5 0}} [
+  /Indexed
+  /DeviceGray
+  0
+  <cc>
+]
+endobj
+{{object 6 0}} <<
+  /Type /XObject
+  /Subtype /Image
+  /BitsPerComponent 1
+  /ColorSpace 5 0 R
+  /Filter /ASCIIHexDecode
+  /Height 4
+  /Width 4
+  {{streamlen}}
+>>
+stream
+0000
+endstream
+endobj
+{{object 7 0}} <<
+  /Type /XObject
+  /Subtype /Image
+  /Width 4
+  /Height 4
+  /BitsPerComponent 8
+  /ColorSpace /DeviceGray
+  /Filter /ASCIIHexDecode
+  {{streamlen}}
+>>
+stream
+00000000
+33333333
+99999999
+cccccccc
+endstream
+endobj
+{{object 8 0}} <<
+  /Type /XObject
+  /Subtype /Image
+  /BitsPerComponent 8
+  /ColorSpace /DeviceRGB
+  /Filter /ASCIIHexDecode
+  /Height 4
+  /Width 4
+  {{streamlen}}
+>>
+stream
+ff0000ff0000ff0000ff0000
+ff0000ff0000ff0000ff0000
+00ff0000ff0000ff0000ff00
+00ff0000ff0000ff0000ff00
+endstream
+endobj
+{{object 9 0}} <<
+  /Type /XObject
+  /Subtype /Image
+  /BitsPerComponent 8
+  /ColorSpace /DeviceRGB
+  /Filter /ASCIIHexDecode
+  /Height 4
+  /Width 4
+  /Mask [0 255 0 0 0 0]
+  {{streamlen}}
+>>
+stream
+ff0000ff0000ff0000ff0000
+ff0000ff0000ff0000ff0000
+00ff0000ff0000ff0000ff00
+00ff0000ff0000ff0000ff00
+endstream
+endobj
+{{xref}}
+{{trailer}}
+{{startxref}}
+%%EOF
diff --git a/testing/resources/pixel/image_transformer_other_expected.pdf.0.png b/testing/resources/pixel/image_transformer_other_expected.pdf.0.png
new file mode 100644
index 0000000..95fa697
--- /dev/null
+++ b/testing/resources/pixel/image_transformer_other_expected.pdf.0.png
Binary files differ