stuff working better now. still kinda meh, but its decent enough.

This commit is contained in:
Yggdrasil75
2025-11-25 12:44:41 -05:00
parent 872cf3db1a
commit ea7328be64
6 changed files with 140 additions and 93 deletions

View File

@@ -145,12 +145,9 @@ public:
static bool saveBMP(const std::string& filename, frame& frame) {
if (frame.colorFormat == frame::colormap::RGB) {
std::cout << "found correct colormap" << std::endl;
return saveBMP(filename, frame.getData(), frame.getWidth(), frame.getHeight());
} else if (frame.colorFormat == frame::colormap::RGBA) {
std::cout << "found incorrect colormap. converting from RGBA" << std::endl;
std::vector<uint8_t> fdata = convertRGBAtoRGB(frame.getData());
std::cout << "source data: " << frame.getData().size() << " out data: " << fdata.size() << std::endl;
return saveBMP(filename, fdata, frame.getWidth(), frame.getHeight());
}
else {