Repository navigation
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! |
Answered by
JimBobSquarePants
Apr 15, 2022
Replies: 1 comment 1 reply
|
Yeah. By calling |
1 reply
Answer selected by
JimBobSquarePants
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeah. By calling
Image.Decode(...)and using aGifDecoderinstance with this property set. https://docs.sixlabors.com/api/ImageSharp/SixLabors.ImageSharp.Formats.Gif.GifDecoder.html#SixLabors_ImageSharp_Formats_Gif_GifDecoder_DecodingMode