Updated output location

This commit is contained in:
Laurent
2026-02-17 18:31:42 +01:00
parent 4a5bf8dfff
commit 423c74dcb8
2 changed files with 10 additions and 6 deletions

View File

@@ -18,9 +18,11 @@ public class GifService
public void ResizeGif(string filePath, int width, int height)
{
string downloadsFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Downloads");
string fileName = Path.GetFileNameWithoutExtension(filePath);
using Gif gif = new Gif(filePath);
gif.Load();
gif.Resize(width, height);
gif.Save(Path.Combine(Directory.GetCurrentDirectory(), "output", $"{width}x{height}.gif"));
gif.Save(Path.Combine(downloadsFolder, "gif-resizer", fileName, $"{fileName}-{width}x{height}.gif"));
}
}