mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-25 05:40:21 -04:00
Fixed #376
This commit is contained in:
parent
6a4979f999
commit
558adb0b66
@ -36,8 +36,13 @@ namespace AssetStudio
|
|||||||
{
|
{
|
||||||
using (originalImage)
|
using (originalImage)
|
||||||
{
|
{
|
||||||
var spriteImage = originalImage.Clone(textureRect, PixelFormat.Format32bppArgb);
|
//var spriteImage = originalImage.Clone(textureRect, PixelFormat.Format32bppArgb);
|
||||||
|
var spriteImage = new Bitmap((int)textureRect.Width, (int)textureRect.Height, PixelFormat.Format32bppArgb);
|
||||||
|
var destRect = new Rectangle(0, 0, (int)textureRect.Width, (int)textureRect.Height);
|
||||||
|
using (var graphic = Graphics.FromImage(spriteImage))
|
||||||
|
{
|
||||||
|
graphic.DrawImage(originalImage, destRect, textureRect, GraphicsUnit.Pixel);
|
||||||
|
}
|
||||||
if (settingsRaw.packed == 1)
|
if (settingsRaw.packed == 1)
|
||||||
{
|
{
|
||||||
//RotateAndFlip
|
//RotateAndFlip
|
||||||
@ -58,7 +63,6 @@ namespace AssetStudio
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Tight
|
//Tight
|
||||||
//TODO 2017 and up use m_PhysicsShape should be better
|
|
||||||
if (settingsRaw.packingMode == SpritePackingMode.kSPMTight)
|
if (settingsRaw.packingMode == SpritePackingMode.kSPMTight)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
Loading…
Reference in New Issue
Block a user