diff --git a/tests/images/png/apng/wpt/LICENSE.md b/tests/images/png/apng/wpt/LICENSE.md new file mode 100644 index 0000000000..39c46d03ac --- /dev/null +++ b/tests/images/png/apng/wpt/LICENSE.md @@ -0,0 +1,11 @@ +# The 3-Clause BSD License + +Copyright © web-platform-tests contributors + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/tests/images/png/apng/wpt/README.txt b/tests/images/png/apng/wpt/README.txt new file mode 100644 index 0000000000..728e17eab6 --- /dev/null +++ b/tests/images/png/apng/wpt/README.txt @@ -0,0 +1,30 @@ +APNG dispose/blend reference tests copied or derived from Web Platform Tests. + +WPT source: https://github.com/web-platform-tests/wpt/tree/b63305b743ed9ce2725d4ae09c5c8f0c40d8e6e1/png/apng + +Credits: +- Chris Lilley, main author of the WPT PNG/APNG tests. +- Philip Taylor, author of the earlier APNG testsuite that many WPT APNG tests + were ported from. + +These files cover all APNG dispose/blend operation combinations: + +WPT files copied as-is: +- support/013.png -> fcTL-dispose-in-region-none.png +- support/015.png -> fcTL-dispose-in-region-background.png +- support/016.png -> fcTL-dispose-in-region-previous.png +- support/018.png -> fcTL-blend-source-transparent.png + +The current WPT APNG files cover none+over, none+source, background+over, and +previous+over. The background+source and previous+source combinations do not +exist in WPT, so these two files are derived: + +- dispose-background-blend-source.png +- dispose-previous-blend-source.png + +The derived files are minimal 3x1 APNGs. Each has an opaque red base frame, a +half-transparent target frame using the dispose/blend operation named by the +file, and a marker frame that makes the target frame's disposal result visible. + +The reference frames in tests/reference/png/apng/wpt/ were generated with APNG +Disassembler 2.9 (apngdis), independently of this crate's PNG decoder. diff --git a/tests/images/png/apng/wpt/dispose-background-blend-source.png b/tests/images/png/apng/wpt/dispose-background-blend-source.png new file mode 100644 index 0000000000..a7ab6a9b95 Binary files /dev/null and b/tests/images/png/apng/wpt/dispose-background-blend-source.png differ diff --git a/tests/images/png/apng/wpt/dispose-previous-blend-source.png b/tests/images/png/apng/wpt/dispose-previous-blend-source.png new file mode 100644 index 0000000000..aca9183d3b Binary files /dev/null and b/tests/images/png/apng/wpt/dispose-previous-blend-source.png differ diff --git a/tests/images/png/apng/wpt/fcTL-blend-source-transparent.png b/tests/images/png/apng/wpt/fcTL-blend-source-transparent.png new file mode 100644 index 0000000000..0f290fd7fd Binary files /dev/null and b/tests/images/png/apng/wpt/fcTL-blend-source-transparent.png differ diff --git a/tests/images/png/apng/wpt/fcTL-dispose-in-region-background.png b/tests/images/png/apng/wpt/fcTL-dispose-in-region-background.png new file mode 100644 index 0000000000..05948d44ae Binary files /dev/null and b/tests/images/png/apng/wpt/fcTL-dispose-in-region-background.png differ diff --git a/tests/images/png/apng/wpt/fcTL-dispose-in-region-none.png b/tests/images/png/apng/wpt/fcTL-dispose-in-region-none.png new file mode 100644 index 0000000000..4e1dbf77e4 Binary files /dev/null and b/tests/images/png/apng/wpt/fcTL-dispose-in-region-none.png differ diff --git a/tests/images/png/apng/wpt/fcTL-dispose-in-region-previous.png b/tests/images/png/apng/wpt/fcTL-dispose-in-region-previous.png new file mode 100644 index 0000000000..f326afa5c2 Binary files /dev/null and b/tests/images/png/apng/wpt/fcTL-dispose-in-region-previous.png differ diff --git a/tests/reference/png/apng/wpt/dispose-background-blend-source.png.anim_01.png b/tests/reference/png/apng/wpt/dispose-background-blend-source.png.anim_01.png new file mode 100644 index 0000000000..36a4efa2a5 Binary files /dev/null and b/tests/reference/png/apng/wpt/dispose-background-blend-source.png.anim_01.png differ diff --git a/tests/reference/png/apng/wpt/dispose-background-blend-source.png.anim_02.png b/tests/reference/png/apng/wpt/dispose-background-blend-source.png.anim_02.png new file mode 100644 index 0000000000..371495655e Binary files /dev/null and b/tests/reference/png/apng/wpt/dispose-background-blend-source.png.anim_02.png differ diff --git a/tests/reference/png/apng/wpt/dispose-background-blend-source.png.anim_03.png b/tests/reference/png/apng/wpt/dispose-background-blend-source.png.anim_03.png new file mode 100644 index 0000000000..1b7ca67107 Binary files /dev/null and b/tests/reference/png/apng/wpt/dispose-background-blend-source.png.anim_03.png differ diff --git a/tests/reference/png/apng/wpt/dispose-previous-blend-source.png.anim_01.png b/tests/reference/png/apng/wpt/dispose-previous-blend-source.png.anim_01.png new file mode 100644 index 0000000000..36a4efa2a5 Binary files /dev/null and b/tests/reference/png/apng/wpt/dispose-previous-blend-source.png.anim_01.png differ diff --git a/tests/reference/png/apng/wpt/dispose-previous-blend-source.png.anim_02.png b/tests/reference/png/apng/wpt/dispose-previous-blend-source.png.anim_02.png new file mode 100644 index 0000000000..371495655e Binary files /dev/null and b/tests/reference/png/apng/wpt/dispose-previous-blend-source.png.anim_02.png differ diff --git a/tests/reference/png/apng/wpt/dispose-previous-blend-source.png.anim_03.png b/tests/reference/png/apng/wpt/dispose-previous-blend-source.png.anim_03.png new file mode 100644 index 0000000000..c22b754f04 Binary files /dev/null and b/tests/reference/png/apng/wpt/dispose-previous-blend-source.png.anim_03.png differ diff --git a/tests/reference/png/apng/wpt/fcTL-blend-source-transparent.png.anim_01.png b/tests/reference/png/apng/wpt/fcTL-blend-source-transparent.png.anim_01.png new file mode 100644 index 0000000000..d534c88ce9 Binary files /dev/null and b/tests/reference/png/apng/wpt/fcTL-blend-source-transparent.png.anim_01.png differ diff --git a/tests/reference/png/apng/wpt/fcTL-blend-source-transparent.png.anim_02.png b/tests/reference/png/apng/wpt/fcTL-blend-source-transparent.png.anim_02.png new file mode 100644 index 0000000000..19ec64c9c9 Binary files /dev/null and b/tests/reference/png/apng/wpt/fcTL-blend-source-transparent.png.anim_02.png differ diff --git a/tests/reference/png/apng/wpt/fcTL-dispose-in-region-background.png.anim_01.png b/tests/reference/png/apng/wpt/fcTL-dispose-in-region-background.png.anim_01.png new file mode 100644 index 0000000000..653421f507 Binary files /dev/null and b/tests/reference/png/apng/wpt/fcTL-dispose-in-region-background.png.anim_01.png differ diff --git a/tests/reference/png/apng/wpt/fcTL-dispose-in-region-background.png.anim_02.png b/tests/reference/png/apng/wpt/fcTL-dispose-in-region-background.png.anim_02.png new file mode 100644 index 0000000000..653421f507 Binary files /dev/null and b/tests/reference/png/apng/wpt/fcTL-dispose-in-region-background.png.anim_02.png differ diff --git a/tests/reference/png/apng/wpt/fcTL-dispose-in-region-background.png.anim_03.png b/tests/reference/png/apng/wpt/fcTL-dispose-in-region-background.png.anim_03.png new file mode 100644 index 0000000000..175c5ddfd8 Binary files /dev/null and b/tests/reference/png/apng/wpt/fcTL-dispose-in-region-background.png.anim_03.png differ diff --git a/tests/reference/png/apng/wpt/fcTL-dispose-in-region-none.png.anim_01.png b/tests/reference/png/apng/wpt/fcTL-dispose-in-region-none.png.anim_01.png new file mode 100644 index 0000000000..b7c3d25fbb Binary files /dev/null and b/tests/reference/png/apng/wpt/fcTL-dispose-in-region-none.png.anim_01.png differ diff --git a/tests/reference/png/apng/wpt/fcTL-dispose-in-region-none.png.anim_02.png b/tests/reference/png/apng/wpt/fcTL-dispose-in-region-none.png.anim_02.png new file mode 100644 index 0000000000..87496f2487 Binary files /dev/null and b/tests/reference/png/apng/wpt/fcTL-dispose-in-region-none.png.anim_02.png differ diff --git a/tests/reference/png/apng/wpt/fcTL-dispose-in-region-none.png.anim_03.png b/tests/reference/png/apng/wpt/fcTL-dispose-in-region-none.png.anim_03.png new file mode 100644 index 0000000000..87496f2487 Binary files /dev/null and b/tests/reference/png/apng/wpt/fcTL-dispose-in-region-none.png.anim_03.png differ diff --git a/tests/reference/png/apng/wpt/fcTL-dispose-in-region-previous.png.anim_01.png b/tests/reference/png/apng/wpt/fcTL-dispose-in-region-previous.png.anim_01.png new file mode 100644 index 0000000000..87496f2487 Binary files /dev/null and b/tests/reference/png/apng/wpt/fcTL-dispose-in-region-previous.png.anim_01.png differ diff --git a/tests/reference/png/apng/wpt/fcTL-dispose-in-region-previous.png.anim_02.png b/tests/reference/png/apng/wpt/fcTL-dispose-in-region-previous.png.anim_02.png new file mode 100644 index 0000000000..b7c3d25fbb Binary files /dev/null and b/tests/reference/png/apng/wpt/fcTL-dispose-in-region-previous.png.anim_02.png differ diff --git a/tests/reference/png/apng/wpt/fcTL-dispose-in-region-previous.png.anim_03.png b/tests/reference/png/apng/wpt/fcTL-dispose-in-region-previous.png.anim_03.png new file mode 100644 index 0000000000..87496f2487 Binary files /dev/null and b/tests/reference/png/apng/wpt/fcTL-dispose-in-region-previous.png.anim_03.png differ