mirror of
https://github.com/aelurum/AssetStudio.git
synced 2026-11-14 11:18:47 -05:00
- Enabled by default - [GUI] Added "Keep original sprite sizes" option to the Export options - [CLI] Added "--sprite-cropping" option to the Advanced section
14 lines
460 B
C#
14 lines
460 B
C#
using SixLabors.ImageSharp;
|
|
using SixLabors.ImageSharp.PixelFormats;
|
|
|
|
namespace AssetStudio
|
|
{
|
|
public static class SpriteExtensions
|
|
{
|
|
public static bool TryGetImage(this Sprite m_Sprite, out Image<Bgra32> spriteImage, SpriteMaskMode spriteMaskMode = SpriteMaskMode.On, bool keepSpriteSize = true)
|
|
{
|
|
return new SpriteConverter(m_Sprite, keepSpriteSize).TryConvertToImage(out spriteImage, spriteMaskMode);
|
|
}
|
|
}
|
|
}
|