Skip to content

Commit

Permalink
handle DecodingMode
Browse files Browse the repository at this point in the history
  • Loading branch information
antonfirsov committed Jul 12, 2024
1 parent 6b2030b commit b33d666
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/ImageSharp/Formats/Gif/GifDecoderCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,14 @@ internal sealed class GifDecoderCore : IImageDecoderInternals
public GifDecoderCore(Configuration configuration, IGifDecoderOptions options)
{
this.skipMetadata = options.IgnoreMetadata;
this.DecodingMode = options.DecodingMode;
this.configuration = configuration ?? Configuration.Default;
this.maxFrames = options.MaxFrames;
this.maxFrames = options.DecodingMode == FrameDecodingMode.All ? options.MaxFrames : 1;
this.memoryAllocator = this.configuration.MemoryAllocator;
}

/// <inheritdoc />
public Configuration Configuration => this.configuration;

/// <summary>
/// Gets the decoding mode for multi-frame images.
/// </summary>
public FrameDecodingMode DecodingMode { get; }

/// <summary>
/// Gets the dimensions of the image.
/// </summary>
Expand Down

0 comments on commit b33d666

Please sign in to comment.