Add a pixel test for GS alpha not being applied to pattern.
Demonstrate the issue. The checked-in PNG shows the current, incorrect
result.
Bug: pdfium:1693
Change-Id: Ia14936310c8ad04084ec37178db312254a8162e2
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/83770
Reviewed-by: Hui Yingst <nigi@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/testing/resources/pixel/bug_1693.in b/testing/resources/pixel/bug_1693.in
new file mode 100644
index 0000000..e59b5f8
--- /dev/null
+++ b/testing/resources/pixel/bug_1693.in
@@ -0,0 +1,101 @@
+{{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
+ /MediaBox [0 0 200 200]
+ /Resources <<
+ /ProcSet [/PDF /ImageC]
+ /ExtGState <<
+ /G3 4 0 R
+ /G8 5 0 R
+ >>
+ /Pattern <<
+ /P7 6 0 R
+ >>
+ >>
+ /Contents 7 0 R
+>>
+endobj
+{{object 4 0}} <<
+ /BM /Normal
+ /ca 1
+>>
+endobj
+{{object 5 0}} <<
+ /BM /Normal
+ /ca .5
+>>
+endobj
+{{object 6 0}} <<
+ /Type /Pattern
+ /PaintType 1
+ /PatternType 1
+ /TilingType 1
+ /BBox [0 0 400 400]
+ /Matrix [256 0 0 32 0 0]
+ /XStep 512
+ /YStep 512
+ /Resources <<
+ /ProcSet [/PDF /ImageC]
+ /ExtGState <<
+ /G3 4 0 R
+ >>
+ /XObject <<
+ /X4 8 0 R
+ >>
+ >>
+ {{streamlen}}
+>>
+stream
+q
+1 0 0 -8 0 8 cm
+/G3 gs
+/X4 Do
+Q
+endstream
+endobj
+{{object 7 0}} <<
+ {{streamlen}}
+>>
+stream
+1 1 1 RG
+1 1 1 rg
+/G3 gs
+/Pattern CS
+/Pattern cs
+/P7 SCN
+/P7 scn
+/G8 gs
+0 0 200 150 re
+f
+endstream
+endobj
+{{object 8 0}} <<
+ /Type /XObject
+ /Subtype /Image
+ /Width 50
+ /Height 50
+ /BitsPerComponent 8
+ /ColorSpace /DeviceRGB
+ /Filter [/ASCIIHexDecode /FlateDecode]
+ {{streamlen}}
+>>
+stream
+789cedc2310d00000c03a07f2aaab3ea7bcf03842655555555555555f5bf01cc7818dc
+endstream
+endobj
+{{xref}}
+{{trailer}}
+{{startxref}}
+%%EOF
diff --git a/testing/resources/pixel/bug_1693_expected.pdf.0.png b/testing/resources/pixel/bug_1693_expected.pdf.0.png
new file mode 100644
index 0000000..d65bd0d
--- /dev/null
+++ b/testing/resources/pixel/bug_1693_expected.pdf.0.png
Binary files differ