From 1e5817e4ba283d7c0ef36309528214a8001d15cf Mon Sep 17 00:00:00 2001 From: Hayden Hunter Date: Sun, 28 Sep 2025 17:20:51 +1300 Subject: [PATCH] =?UTF-8?q?Fix=20`CELL=5FGCM=5FTEXTURE=5FA8R8G8B8`=20outpu?= =?UTF-8?q?ts=E2=80=99=20reversed=20channels?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PDTools.Files/Textures/PS3/PGLUCellTextureInfo.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/PDTools.Files/Textures/PS3/PGLUCellTextureInfo.cs b/PDTools.Files/Textures/PS3/PGLUCellTextureInfo.cs index b36182c..91a97cf 100644 --- a/PDTools.Files/Textures/PS3/PGLUCellTextureInfo.cs +++ b/PDTools.Files/Textures/PS3/PGLUCellTextureInfo.cs @@ -339,12 +339,8 @@ internal void CreateDDSData(byte[] imageData, Stream outStream) // Swap channels for DDS if (format == CELL_GCM_TEXTURE_FORMAT.CELL_GCM_TEXTURE_A8R8G8B8 || format == CELL_GCM_TEXTURE_FORMAT.CELL_GCM_TEXTURE_D8R8G8B8) { - var sp = MemoryMarshal.Cast(imageData); for (var i = 0; i < Width * Height * 4; i += 4) { - // Swap endian first - sp[i / 4] = BinaryPrimitives.ReverseEndianness(sp[i / 4]); - // Remap channels byte r = imageData[i + (byte)InR]; byte g = imageData[i + (byte)InG];