diff --git a/ASTCEncoder/src/Decompressor.cpp b/ASTCEncoder/src/Decompressor.cpp index 322e170..afcb0fb 100644 --- a/ASTCEncoder/src/Decompressor.cpp +++ b/ASTCEncoder/src/Decompressor.cpp @@ -1008,6 +1008,16 @@ namespace ASTCC { blockIdx++; } } + + // Flip the image... + uint32 *imgStart = reinterpret_cast(dcj.OutBuf()); + for(uint32 j = 0; j < (dcj.Height() >> 1); j++) { + for(uint32 i = 0; i < dcj.Width(); i++) { + const uint32 rowA = j*dcj.Width(); + const uint32 rowB = (dcj.Height() - j - 1) * dcj.Width(); + std::swap(imgStart[rowA + i], imgStart[rowB + i]); + } + } } } // namespace ASTCC