-
-
Notifications
You must be signed in to change notification settings - Fork 860
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
V4 : Fix GIF, PNG, and WEBP Edge Case Handling #2894
base: main
Are you sure you want to change the base?
Conversation
/// </summary> | ||
private sealed class Octree | ||
internal sealed class Octree : IDisposable |
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.
@rickbrew @saucecontrol This is the new "Octree" I've been chatting to you about.
/// typically very short; in the worst-case, the number of iterations is bounded by 256. | ||
/// This guarantees highly efficient and predictable performance for small, fixed-size color palettes. | ||
/// </remarks> | ||
internal sealed unsafe class ExactCache : IDisposable |
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.
@rickbrew @saucecontrol Here's the new Exact and Coarse caches I built. They work really well!
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.
Copilot reviewed 177 out of 177 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
src/ImageSharp/Formats/Png/PngEncoderCore.cs:1482
- Ensure that 'backgroundColor' is reliably assigned before any use, as the [MemberNotNull] attribute enforces non-nullability and a missing assignment could lead to runtime violations.
[MemberNotNull(nameof(backgroundColor))]
src/ImageSharp/Formats/Png/PngEncoderCore.cs:1557
- Verify that 'paletteQuantizer' is defined as a nullable value type; if it is or becomes a reference type, using 'HasValue' may introduce nullability issues in future changes.
if (paletteQuantizer.HasValue)
Prerequisites
Description
#2882 but for V4.
Fixes #2866
Fixes #2862
Changes shared with V3:
V4 Specific changes