-
-
Notifications
You must be signed in to change notification settings - Fork 888
v3 : Add Full Metadata Parsing for WEBP Animations #3002
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds full metadata parsing for WEBP animations by extending the Identify method to extract frame-level metadata without decoding pixel data. The implementation enables metadata extraction for both lossless and lossy animated WEBP images, and also addresses resolution metadata parsing from EXIF profiles.
- Adds
Identifymethod toWebpAnimationDecoderfor metadata-only parsing of animated WEBP files - Integrates EXIF resolution metadata into image metadata for WEBP format
- Updates error handling to follow WEBP specification by ignoring unknown chunks instead of throwing exceptions
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| WebpDecoderTests.cs | Adds test cases to verify metadata extraction for animated lossless and lossy WEBP images |
| WebpDecoderCore.cs | Routes animated WEBP identification through the animation decoder for complete metadata parsing |
| WebpChunkParsingUtils.cs | Extracts and applies resolution values from EXIF profiles to image metadata |
| WebpAnimationDecoder.cs | Implements frame metadata parsing in Identify method and adds skipMetadata parameter support |
| PngFrameMetadata.cs | Corrects documentation from "hundredths" to "seconds" for frame delay specification |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Updated [SixLabors.ImageSharp](https://github.com/SixLabors/ImageSharp) from 3.1.11 to 3.1.12. <details> <summary>Release notes</summary> _Sourced from [SixLabors.ImageSharp's releases](https://github.com/SixLabors/ImageSharp/releases)._ ## 3.1.12 ## What's Changed * v3 : Add Full Metadata Parsing for WEBP Animations by @JimBobSquarePants in SixLabors/ImageSharp#3002 * V3: Prevent negative allocation attempt for huge TIFF files by @JimBobSquarePants in SixLabors/ImageSharp#3004 * Backport v3 : Tiff decoder: Fix issue 2679 by @JimBobSquarePants in SixLabors/ImageSharp#3007 **Full Changelog**: SixLabors/ImageSharp@v3.1.11...v3.1.12 Commits viewable in [compare view](SixLabors/ImageSharp@v3.1.11...v3.1.12). </details> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
[//]: # (dependabot-start)⚠️ **Dependabot is rebasing this PR**⚠️ Rebasing might not happen immediately, so don't worry if this takes some time. Note: if you make any changes to this PR yourself, they will take precedence over the rebase. --- [//]: # (dependabot-end) Updated [SixLabors.ImageSharp](https://github.com/SixLabors/ImageSharp) from 3.1.11 to 3.1.12. <details> <summary>Release notes</summary> _Sourced from [SixLabors.ImageSharp's releases](https://github.com/SixLabors/ImageSharp/releases)._ ## 3.1.12 ## What's Changed * v3 : Add Full Metadata Parsing for WEBP Animations by @JimBobSquarePants in SixLabors/ImageSharp#3002 * V3: Prevent negative allocation attempt for huge TIFF files by @JimBobSquarePants in SixLabors/ImageSharp#3004 * Backport v3 : Tiff decoder: Fix issue 2679 by @JimBobSquarePants in SixLabors/ImageSharp#3007 **Full Changelog**: SixLabors/ImageSharp@v3.1.11...v3.1.12 Commits viewable in [compare view](SixLabors/ImageSharp@v3.1.11...v3.1.12). </details> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> <!-- RECURSEML_SUMMARY:START --> ## High-level PR Summary This PR updates the `SixLabors.ImageSharp` dependency from version 3.1.11 to 3.1.12, which includes bug fixes for WEBP animation metadata parsing, TIFF file allocation issues, and other TIFF decoder improvements. ⏱️ Estimated Review Time: 5-15 minutes <details> <summary>💡 Review Order Suggestion</summary> | Order | File Path | |-------|-----------| | 1 | `Directory.Packages.props` | </details> [](https://discord.gg/n3SsVDAW6U) <!-- RECURSEML_SUMMARY:END --> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Prerequisites
Description
#3001 for the v3.x release
Fixes #2992
Fixes #2988 (I wasn't using up my LFS budget for a separate run)