Updated output location
This commit is contained in:
@@ -1,11 +1,13 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net10.0-windows</TargetFramework>
|
<TargetFramework>net10.0-windows</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<UseWPF>true</UseWPF>
|
<UseWPF>true</UseWPF>
|
||||||
|
<SelfContained>true</SelfContained>
|
||||||
|
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -18,9 +18,11 @@ public class GifService
|
|||||||
|
|
||||||
public void ResizeGif(string filePath, int width, int height)
|
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);
|
using Gif gif = new Gif(filePath);
|
||||||
gif.Load();
|
gif.Load();
|
||||||
gif.Resize(width, height);
|
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"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user