mirror of
https://github.com/aelurum/AssetStudio.git
synced 2026-11-14 11:18:47 -05:00
Add option to keep original sprite sizes. Close #107
- Enabled by default - [GUI] Added "Keep original sprite sizes" option to the Export options - [CLI] Added "--sprite-cropping" option to the Advanced section
This commit is contained in:
@@ -77,7 +77,8 @@ namespace AssetStudioCLI
|
||||
{
|
||||
debugLog = "";
|
||||
var type = CLIOptions.o_imageFormat.Value;
|
||||
var converter = new SpriteConverter((Sprite)item.Asset);
|
||||
var keepSpriteSize = CLIOptions.o_spriteCroppingMode.Value == SpriteCroppingMode.SpriteRect;
|
||||
var converter = new SpriteConverter((Sprite)item.Asset, keepSpriteSize);
|
||||
if (CLIOptions.o_filenameFormat.Value == FilenameFormat.AssetName_Hash)
|
||||
item.Hash = converter.GetSpriteHash();
|
||||
if (!TryExportFile(exportPath, item, $".{type}", out var exportFullPath))
|
||||
|
||||
Reference in New Issue
Block a user