diff --git a/src/fart/Engine.cpp b/src/fart/Engine.cpp index 49405e2..efca85a 100644 --- a/src/fart/Engine.cpp +++ b/src/fart/Engine.cpp @@ -7,5 +7,19 @@ Engine::Engine(const RenderParams & params) int Engine::run(string_view input_file, opt output_file) { + string output_path; + if (output_file) + { + output_path = *output_file; + } + else + { + string_view base = input_file; + if (base.ends_with(".fart")) + { + base.remove_suffix(5u); + } + output_path = string(base) + ".png"; + } return 0; }