diff --git a/AssetStudioGUI/AssetStudioGUI.csproj b/AssetStudioGUI/AssetStudioGUI.csproj
index 7261b35..8ac7294 100644
--- a/AssetStudioGUI/AssetStudioGUI.csproj
+++ b/AssetStudioGUI/AssetStudioGUI.csproj
@@ -54,14 +54,14 @@
-
-
+
+
-
-
+
+
Libraries\OpenTK.WinForms.dll
diff --git a/AssetStudioUtility/AssetStudioUtility.csproj b/AssetStudioUtility/AssetStudioUtility.csproj
index 04e58a6..02d818a 100644
--- a/AssetStudioUtility/AssetStudioUtility.csproj
+++ b/AssetStudioUtility/AssetStudioUtility.csproj
@@ -22,7 +22,7 @@
0.17.0
-
+
diff --git a/AssetStudioUtility/SpriteHelper.cs b/AssetStudioUtility/SpriteHelper.cs
index 382bd08..f4cdcbd 100644
--- a/AssetStudioUtility/SpriteHelper.cs
+++ b/AssetStudioUtility/SpriteHelper.cs
@@ -154,9 +154,16 @@ namespace AssetStudio
if (triangles.Length < 1024)
{
var rectP = new RectangularPolygon(0, 0, rect.Width, rect.Height);
- spriteImage.Mutate(x => x.Fill(options, SixLabors.ImageSharp.Color.Red, rectP.Clip(path)));
- spriteImage.Mutate(x => x.Flip(FlipMode.Vertical));
- return spriteImage;
+ try
+ {
+ spriteImage.Mutate(x => x.Fill(options, SixLabors.ImageSharp.Color.Red, rectP.Clip(path)));
+ spriteImage.Mutate(x => x.Flip(FlipMode.Vertical));
+ return spriteImage;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // ignored
+ }
}
using (var mask = new Image(rect.Width, rect.Height, SixLabors.ImageSharp.Color.Black))
{
@@ -167,9 +174,9 @@ namespace AssetStudio
return spriteImage;
}
}
- catch
+ catch (Exception e)
{
- // ignored
+ Logger.Warning($"{m_Sprite.m_Name} Unable to render the packed sprite correctly.\n{e}");
}
}