How to load only 1 frame from GIF #2089
-
Is it possible to load only one (first) frame from a GIF without loading the rest? E.g. if GIF image have 600 frames, all of them will be loaded in memory when I only need 1. If it is not possible - do you have any work arounds how I can do that? Maybe load and immediately discard every frame that I don't need? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yeah. By calling |
Beta Was this translation helpful? Give feedback.
Yeah. By calling
Image.Decode(...)
and using aGifDecoder
instance with this property set. https://docs.sixlabors.com/api/ImageSharp/SixLabors.ImageSharp.Formats.Gif.GifDecoder.html#SixLabors_ImageSharp_Formats_Gif_GifDecoder_DecodingMode