You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
482 B
21 lines
482 B
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include "PixelRenderer.hpp"
|
|
|
|
namespace massivedynamic {
|
|
|
|
class BMPRenderer final : public PixelRenderer {
|
|
public:
|
|
BMPRenderer(const std::vector<bool>& pixels, size_t sourceSize, size_t targetSize) : PixelRenderer(pixels, sourceSize, targetSize) {}
|
|
|
|
virtual void render(const std::string& filename) override {
|
|
this->generateBuffer();
|
|
|
|
stbi_write_bmp((filename + ".bmp").c_str(), targetSize, targetSize, 4, this->bitmap.data());
|
|
}
|
|
|
|
};
|
|
|
|
} |