Add APNG dispose and blend reference tests#3054
Conversation
|
Thanks for working on this. This looks much better. Just one thing:
Is there a reason why you did this? Unfortunately, this makes it harder to review and verify correctness. Had you copied the WPT files as is, I could just look at the decoded frames and use WPT as the reference for what they should be. Now I have to analyze the APNGs you added to see whether they actually have the properties they should. And if they do, I can't use WPT as a reference to check whether our decoder actually decodes them correctly. So unless there's a good reason for using 3x1 images, could you please use the WPT APNGs as is? |
95f3bed to
f52ad41
Compare
Thanks, that makes sense. I updated the PR to copy the available WPT APNG files byte-for-byte and only rename them:
WPT does not seem to currently have APNG files for the
I also updated the PR description/README to make that distinction clear. |
RunDevelopment
left a comment
There was a problem hiding this comment.
I verified that the new images are indeed what the Readme.txt says they are, and everything checks out. Thank you!
Closes #3052.
This adds reference tests for all APNG dispose/blend operation combinations using the existing reference image infrastructure. No test harness or decoder code is changed.
Four APNG inputs are copied byte-for-byte from Web Platform Tests and renamed after the behavior they exercise:
support/013.png->fcTL-dispose-in-region-none.pngsupport/015.png->fcTL-dispose-in-region-background.pngsupport/016.png->fcTL-dispose-in-region-previous.pngsupport/018.png->fcTL-blend-source-transparent.pngWPT does not currently include APNG files for the
background+sourceandprevious+sourcecombinations, so this also adds two minimal derived APNGs for those missing cases:dispose-background-blend-source.pngdispose-previous-blend-source.pngThe reference frames were generated with APNG Disassembler 2.9 (
apngdis), independently of this crate's PNG decoder.WPT attribution is included in
tests/images/png/apng/wpt/README.txt, and the WPT BSD-3-Clause license is included intests/images/png/apng/wpt/LICENSE.md.I used AI assistance while creating and reviewing these test assets.