refactor: Deduplicated BMP header writing in Xtc (#1439)
## Summary **What is the goal of this PR?** Replaced manual 1-bit BMP header logic in `Xtc::generateCoverBmp()` and `Xtc::generateThumbBmp()` with calls to the existing `createBmpHeader()` utility. Added a `BmpRowOrder` enum and param to support the top-down row order of XTC cover images. --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**PARTIALLY**_
This commit is contained in:
1 parent
104f391a29
commit
5ba85290ab
4 files changed
+21
-95
No files matched your search
@@ -62,7 +62,7 @@ bool ScreenshotUtil::saveFramebufferAsBmp(const char* filename, const uint8_t* f
|
||||
|
||||
BmpHeader header;
|
||||
|
||||
createBmpHeader(&header, phyWidth, phyHeight);
|
||||
createBmpHeader(&header, phyWidth, phyHeight, BmpRowOrder::BottomUp);
|
||||
|
||||
bool write_error = false;
|
||||
if (file.write(reinterpret_cast<uint8_t*>(&header), sizeof(header)) != sizeof(header)) {
|
||||
|
||||
Reference in new issue
Block a user