From 6b77b1a66621cb5c7172b58c7d996c15e9a081be Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Sun, 1 Nov 2026 20:20:31 -0500 Subject: [PATCH] Build an ImageWriter --- src/fart/Engine.cpp | 7 +++++++ src/fart/Engine.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/fart/Engine.cpp b/src/fart/Engine.cpp index efca85a..0e7492e 100644 --- a/src/fart/Engine.cpp +++ b/src/fart/Engine.cpp @@ -21,5 +21,12 @@ int Engine::run(string_view input_file, opt output_file) } output_path = string(base) + ".png"; } + + image_writer.reset(ImageWriter::build(output_path)); + if (!image_writer) + { + return 1; + } + return 0; } diff --git a/src/fart/Engine.h b/src/fart/Engine.h index a394f06..951469c 100644 --- a/src/fart/Engine.h +++ b/src/fart/Engine.h @@ -1,6 +1,8 @@ #pragma once +#include #include +#include class Engine { @@ -10,4 +12,5 @@ public: protected: RenderParams params; + std::unique_ptr image_writer; };