Skip to content

Commit b33d666

Browse files
committed
handle DecodingMode
1 parent 6b2030b commit b33d666

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/ImageSharp/Formats/Gif/GifDecoderCore.cs

+1-7
Original file line numberDiff line numberDiff line change
@@ -100,20 +100,14 @@ internal sealed class GifDecoderCore : IImageDecoderInternals
100100
public GifDecoderCore(Configuration configuration, IGifDecoderOptions options)
101101
{
102102
this.skipMetadata = options.IgnoreMetadata;
103-
this.DecodingMode = options.DecodingMode;
104103
this.configuration = configuration ?? Configuration.Default;
105-
this.maxFrames = options.MaxFrames;
104+
this.maxFrames = options.DecodingMode == FrameDecodingMode.All ? options.MaxFrames : 1;
106105
this.memoryAllocator = this.configuration.MemoryAllocator;
107106
}
108107

109108
/// <inheritdoc />
110109
public Configuration Configuration => this.configuration;
111110

112-
/// <summary>
113-
/// Gets the decoding mode for multi-frame images.
114-
/// </summary>
115-
public FrameDecodingMode DecodingMode { get; }
116-
117111
/// <summary>
118112
/// Gets the dimensions of the image.
119113
/// </summary>

0 commit comments

Comments
 (0)