Example #1
0
        public async Task <FormsCAKeyFrameAnimation> LoadImageAnimationAsync(ImageSource imagesource, CancellationToken cancelationToken = default(CancellationToken), float scale = 1)
        {
            FormsCAKeyFrameAnimation animation = await ImageAnimationHelper.CreateAnimationFromStreamImageSourceAsync(imagesource as StreamImageSource, cancelationToken).ConfigureAwait(false);

            if (animation == null)
            {
                Controls.Internals.Log.Warning(nameof(FileImageSourceHandler), "Could not find image: {0}", imagesource);
            }

            return(animation);
        }
Example #2
0
        public async Task <FormsCAKeyFrameAnimation> LoadImageAnimationAsync(ImageSource imagesource, CancellationToken cancelationToken = default(CancellationToken), float scale = 1)
        {
            FormsCAKeyFrameAnimation animation = await ImageAnimationHelper.CreateAnimationFromStreamImageSourceAsync(imagesource as StreamImageSource, cancelationToken).ConfigureAwait(false);

            if (animation == null)
            {
                Forms.MauiContext?.CreateLogger <FileImageSourceHandler>()?.LogWarning("Could not find image: {imagesource}", imagesource);
            }

            return(animation);
        }