Build an ImageWriter
This commit is contained in:
1 parent
d7394027b1
commit
6b77b1a666
2 files changed
+10
No files matched your search
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
};
|
||||
Reference in new issue
Block a user