Skip to content
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

Normalize Animation Encoders #2842

Merged
merged 3 commits into from
Nov 21, 2024
Merged

Conversation

JimBobSquarePants
Copy link
Member

@JimBobSquarePants JimBobSquarePants commented Nov 21, 2024

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

Adds a couple of new interfaces and base classes to normalize configuration of encoders for formats that produce animation sequences.

Also

  • Fixes missing cancellation token handling when encoding those sequences.
  • Updates testing references.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 11 out of 26 changed files in this pull request and generated 1 suggestion.

Files not reviewed (15)
  • tests/Directory.Build.targets: Language not supported
  • tests/ImageSharp.Benchmarks/ImageSharp.Benchmarks.csproj: Language not supported
  • src/ImageSharp/Formats/QuantizingImageEncoder.cs: Evaluated as low risk
  • src/ImageSharp/Formats/Webp/WebpEncoder.cs: Evaluated as low risk
  • tests/ImageSharp.Benchmarks/Codecs/Webp/DecodeWebp.cs: Evaluated as low risk
  • tests/ImageSharp.Benchmarks/Codecs/Tga/DecodeTga.cs: Evaluated as low risk
  • src/ImageSharp/Formats/Webp/WebpFrameMetadata.cs: Evaluated as low risk
  • src/ImageSharp/Formats/Webp/WebpEncoderCore.cs: Evaluated as low risk
  • src/ImageSharp/Formats/FormatConnectingMetadata.cs: Evaluated as low risk
  • src/ImageSharp/Formats/Webp/Lossy/Vp8Encoder.cs: Evaluated as low risk
  • src/ImageSharp/Formats/Gif/GifEncoder.cs: Evaluated as low risk
  • src/ImageSharp/Formats/Png/PngEncoder.cs: Evaluated as low risk
  • src/ImageSharp/Formats/Webp/Lossless/Vp8LEncoder.cs: Evaluated as low risk
  • src/ImageSharp/Formats/Webp/WebpAnimationDecoder.cs: Evaluated as low risk
  • src/ImageSharp/Formats/Png/PngEncoderCore.cs: Evaluated as low risk

@@ -126,7 +127,7 @@ public Task ForEachImageParallelAsync(Func<string, Task> action)
: Environment.ProcessorCount;
int partitionSize = (int)Math.Ceiling((double)this.Images.Length / maxDegreeOfParallelism);

List<Task> tasks = new();
List<Task> tasks = [];
Copy link
Preview

Copilot AI Nov 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The initialization of the tasks list is incorrect. It should be 'List tasks = new List();'.

Suggested change
List<Task> tasks = [];
List<Task> tasks = new List<Task>();

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JimBobSquarePants JimBobSquarePants merged commit c873e91 into main Nov 21, 2024
8 checks passed
@JimBobSquarePants JimBobSquarePants deleted the js/normalize-animation-encoder branch November 21, 2024 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant