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