[Image Resizer] Add warning for gif files (#12892)

This commit is contained in:
Jaime Bernardo
2021-08-25 16:50:35 +01:00
committed by GitHub
parent 0f55256262
commit 39d46074d6
4 changed files with 36 additions and 5 deletions

View File

@@ -2,6 +2,7 @@
// The Brice Lambson licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information. Code forked from Brice Lambson's https://github.com/bricelam/ImageResizer/
using System.Linq;
using System.Windows.Input;
using ImageResizer.Helpers;
using ImageResizer.Models;
@@ -42,6 +43,15 @@ namespace ImageResizer.ViewModels
public ICommand CancelCommand { get; }
public bool TryingToResizeGifFiles
{
get
{
// Any of the files is a gif.
return _batch.Files.Any(filename => filename.EndsWith(".gif", System.StringComparison.InvariantCultureIgnoreCase));
}
}
public void Resize()
{
Settings.Save();