mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-25 05:40:21 -04:00
Fixes #591
This commit is contained in:
parent
03f74bac64
commit
06ce479eb6
@ -37,6 +37,14 @@ namespace AssetStudio
|
||||
{
|
||||
//var spriteImage = originalImage.Clone(textureRect, PixelFormat.Format32bppArgb);
|
||||
var textureRectI = Rectangle.Round(textureRect);
|
||||
if (textureRectI.Width == 0)
|
||||
{
|
||||
textureRectI.Width = 1;
|
||||
}
|
||||
if (textureRectI.Height == 0)
|
||||
{
|
||||
textureRectI.Height = 1;
|
||||
}
|
||||
var spriteImage = new Bitmap(textureRectI.Width, textureRectI.Height, PixelFormat.Format32bppArgb);
|
||||
var destRect = new Rectangle(0, 0, textureRectI.Width, textureRectI.Height);
|
||||
using (var graphic = Graphics.FromImage(spriteImage))
|
||||
|
Loading…
Reference in New Issue
Block a user