Build an ImageWriter

This commit is contained in:
josh committed 2026-11-01 20:20:31 -05:00
1 parent d7394027b1
commit 6b77b1a666
2 files changed
+10

No files matched your search

+7
View File
@@ -21,5 +21,12 @@ int Engine::run(string_view input_file, opt<string_view> output_file)
}
output_path = string(base) + ".png";
}
image_writer.reset(ImageWriter::build(output_path));
if (!image_writer)
{
return 1;
}
return 0;
}
+3
View File
@@ -1,6 +1,8 @@
#pragma once
#include <fart/ImageWriter.h>
#include <fart/RenderParams.h>
#include <memory>
class Engine
{
@@ -10,4 +12,5 @@ public:
protected:
RenderParams params;
std::unique_ptr<ImageWriter> image_writer;
};