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; };