mirror of https://github.com/SixLabors/ImageSharp
7 changed files with 81 additions and 14 deletions
@ -0,0 +1,21 @@ |
|||||
|
// Copyright (c) Six Labors.
|
||||
|
// Licensed under the Six Labors Split License.
|
||||
|
|
||||
|
namespace SixLabors.ImageSharp.Formats.Webp; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Enum to decide how to handle the background color of the Animation chunk during decoding.
|
||||
|
/// </summary>
|
||||
|
public enum BackgroundColorHandling |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// The background color of the ANIM chunk will be used to initialize the canvas to fill the unused space on the canvas around the frame.
|
||||
|
/// Also, if AnimationDisposalMethod.Dispose is used, this color will be used to restore the canvas background.
|
||||
|
/// </summary>
|
||||
|
Standard = 0, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// The background color of the ANIM chunk is ignored and instead the canvas is initialized with black, BGRA(0, 0, 0, 0).
|
||||
|
/// </summary>
|
||||
|
Ignore = 1 |
||||
|
} |
||||
@ -0,0 +1,21 @@ |
|||||
|
// Copyright (c) Six Labors.
|
||||
|
// Licensed under the Six Labors Split License.
|
||||
|
|
||||
|
namespace SixLabors.ImageSharp.Formats.Webp; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Configuration options for decoding webp images.
|
||||
|
/// </summary>
|
||||
|
public sealed class WebpDecoderOptions : ISpecializedDecoderOptions |
||||
|
{ |
||||
|
/// <inheritdoc/>
|
||||
|
public DecoderOptions GeneralOptions { get; init; } = new(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Gets the flag to decide how to handle the background color Animation Chunk.
|
||||
|
/// The specification is vague on how to handle the background color of the animation chunk.
|
||||
|
/// This option let's the user choose how to deal with it.
|
||||
|
/// </summary>
|
||||
|
/// <see href="https://developers.google.com/speed/webp/docs/riff_container#animation"/>
|
||||
|
public BackgroundColorHandling BackgroundColorHandling { get; init; } = BackgroundColorHandling.Standard; |
||||
|
} |
||||
Loading…
Reference in new issue