mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-27 22:00:23 -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 spriteImage = originalImage.Clone(textureRect, PixelFormat.Format32bppArgb);
|
||||||
var textureRectI = Rectangle.Round(textureRect);
|
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 spriteImage = new Bitmap(textureRectI.Width, textureRectI.Height, PixelFormat.Format32bppArgb);
|
||||||
var destRect = new Rectangle(0, 0, textureRectI.Width, textureRectI.Height);
|
var destRect = new Rectangle(0, 0, textureRectI.Width, textureRectI.Height);
|
||||||
using (var graphic = Graphics.FromImage(spriteImage))
|
using (var graphic = Graphics.FromImage(spriteImage))
|
||||||
|
Loading…
Reference in New Issue
Block a user