Add a new test for rendering JPX images

Adds a new test case that the *Alpha images contain soft-mask
information, but the PDF should not render that mask due to missing
/SMaskInData entries. This will help improve test coverage on images
of which the image component numbers do not match the color channel numbers.

The expected result reflects the correct rendering result, which
aligns with the Acrobat rendering result.

Bug: pdfium:1747
Change-Id: I5a5e70a2aab5b7ae867ac7401ce98ba5f295100a
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/104933
Commit-Queue: Nigi <nigi@chromium.org>
Reviewed-by: K. Moon <kmoon@chromium.org>
diff --git a/testing/SUPPRESSIONS b/testing/SUPPRESSIONS
index a855279..b917743 100644
--- a/testing/SUPPRESSIONS
+++ b/testing/SUPPRESSIONS
@@ -381,6 +381,7 @@
 jpxdecode.in * * * *
 jpxdecode_without_bitspercomponent.in * * * *
 jpxdecode_without_colorspace.in * * * *
+jpxdecode_without_smaskindata.in * * * *
 
 # TODO(chromium:1028991): Remove after associated bug is fixed
 reset_button.in * * * *
diff --git a/testing/resources/pixel/jpxdecode_without_smaskindata.in b/testing/resources/pixel/jpxdecode_without_smaskindata.in
new file mode 100644
index 0000000..ab29a60
--- /dev/null
+++ b/testing/resources/pixel/jpxdecode_without_smaskindata.in
@@ -0,0 +1,111 @@
+{{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 48 128]
+  /Resources <<
+    /XObject <<
+      /ImGrayAlpha 5 0 R
+      /ImRGBAlpha 6 0 R
+      /ImCMYKAlpha 7 0 R
+    >>
+  >>
+>>
+endobj
+{{object 4 0}} <<
+  {{streamlen}}
+>>
+stream
+
+% 50% gray background rectangle
+q
+  0.5 0.5 0.5 rg
+  0 0 48 128 re
+  f
+Q
+
+% grayscale with ignored alpha
+q
+  32 0 0 32 8 88 cm
+  /ImGrayAlpha Do
+Q
+
+% RGB with ignored alpha
+q
+  32 0 0 32 8 48 cm
+  /ImRGBAlpha Do
+Q
+
+% CMYK with ignored alpha
+q
+  32 0 0 32 8 8 cm
+  /ImCMYKAlpha Do
+Q
+
+endstream
+endobj
+
+% grayscale with opacity, but the soft-mask information is not used.
+{{object 5 0}} <<
+  /Type /XObject
+  /Subtype /Image
+  /BitsPerComponent 8
+  /ColorSpace /DeviceGray
+  /Filter /JPXDecode
+  /Height 4
+  /Width 4
+  {{streamlen}}
+>>
+stream
+{{include ../gray-alpha.jp2}}
+endstream
+endobj
+
+% RGB with opacity, but the soft-mask information is not used.
+{{object 6 0}} <<
+  /Type /XObject
+  /Subtype /Image
+  /BitsPerComponent 8
+  /ColorSpace /DeviceRGB
+  /Filter /JPXDecode
+  /Height 4
+  /Width 4
+  {{streamlen}}
+>>
+stream
+{{include ../RGB-alpha.jp2}}
+endstream
+endobj
+
+% CMYK with opacity, but the soft-mask information is not used.
+{{object 7 0}} <<
+  /Type /XObject
+  /Subtype /Image
+  /BitsPerComponent 8
+  /ColorSpace /DeviceCMYK
+  /Filter /JPXDecode
+  /Height 4
+  /Width 4
+  {{streamlen}}
+>>
+stream
+{{include ../CMYK-alpha.jpf}}
+endstream
+endobj
+
+{{xref}}
+{{trailer}}
+{{startxref}}
+%%EOF
diff --git a/testing/resources/pixel/jpxdecode_without_smaskindata_expected.pdf.0.png b/testing/resources/pixel/jpxdecode_without_smaskindata_expected.pdf.0.png
new file mode 100644
index 0000000..5405d1e
--- /dev/null
+++ b/testing/resources/pixel/jpxdecode_without_smaskindata_expected.pdf.0.png
Binary files differ