public IEnumerator Start() { var bytes = File.ReadAllBytes(LargeSample); var iterator = Gif.DecodeIterator(bytes); var iteratorSize = Gif.GetDecodeIteratorSize(bytes); var frames = new List <GifFrame>(); var index = 0f; foreach (var frame in iterator) { frames.Add(frame); ProgressFill.fillAmount = ++index / iteratorSize; yield return(null); } var gif = new Gif(frames); AnimatedImage.Play(gif); }