aviwriter has been wrong this whole time. fixed it. also fixed lack of alpha. and broke ratio. its decent now.

This commit is contained in:
Yggdrasil75
2025-11-18 14:07:10 -05:00
parent 7a4f200b9d
commit 4b978bfd6a
7 changed files with 250 additions and 176 deletions

View File

@@ -8,6 +8,7 @@
#include <algorithm>
#include <filesystem>
#include "../vectorlogic/vec3.hpp"
#include "frame.hpp"
class BMPWriter {
private:
@@ -137,6 +138,10 @@ public:
return true;
}
static bool saveBMP(const std::string& filename, frame& frame) {
return saveBMP(filename, frame.getData(), frame.getWidth(), frame.getHeight());
}
private:
static bool saveBMP(const std::string& filename, const std::vector<std::vector<Vec3>>& pixels, int width, int height) {
// Create directory if needed