Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions PDTools.Files/Textures/PS3/PGLUCellTextureInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<byte, uint>(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];
Expand Down