mirror of
https://git.v0l.io/Kieran/void.cat.git
synced 2025-11-15 06:46:33 +01:00
loop if gif input
This commit is contained in:
@@ -20,7 +20,8 @@ public class CompressContent
|
||||
try
|
||||
{
|
||||
string? outMime = null;
|
||||
switch (Path.GetExtension(input))
|
||||
var inExt = Path.GetExtension(input).ToLower();
|
||||
switch (inExt)
|
||||
{
|
||||
case ".jpg":
|
||||
case ".jpeg":
|
||||
@@ -40,6 +41,10 @@ public class CompressContent
|
||||
.OutputToFile(output, true, o =>
|
||||
{
|
||||
o.WithoutMetadata();
|
||||
if (inExt == ".gif")
|
||||
{
|
||||
o.Loop(0);
|
||||
}
|
||||
})
|
||||
.CancellableThrough(cts);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user