Update cropping method for Switch deswizzler

Inspired by AssetRipper, yeah
This commit is contained in:
VaDiM
2026-01-27 00:05:24 +03:00
parent 6fcbf4ca2e
commit abeb251488
3 changed files with 70 additions and 76 deletions
+1 -11
View File
@@ -18,17 +18,7 @@ namespace AssetStudio
if (!converter.DecodeTexture2D(buff))
return null;
Image<Bgra32> image;
if (converter.UsesSwitchSwizzle)
{
var uncroppedSize = converter.GetUncroppedSize();
image = Image.LoadPixelData<Bgra32>(spanBuff, uncroppedSize.Width, uncroppedSize.Height);
image.Mutate(x => x.Crop(m_Texture2D.m_Width, m_Texture2D.m_Height));
}
else
{
image = Image.LoadPixelData<Bgra32>(spanBuff, m_Texture2D.m_Width, m_Texture2D.m_Height);
}
var image = Image.LoadPixelData<Bgra32>(spanBuff, m_Texture2D.m_Width, m_Texture2D.m_Height);
if (flip)
{