2019-03-28 11:26:05 +00:00
|
|
|
#include "methods.hh"
|
|
|
|
#include "parseargs.hh"
|
2019-04-27 14:27:22 +00:00
|
|
|
|
2019-03-28 11:39:33 +00:00
|
|
|
#include <cstdlib>
|
|
|
|
#include <ctime>
|
|
|
|
#include <iostream>
|
2019-03-19 10:15:42 +00:00
|
|
|
|
2019-04-27 14:27:22 +00:00
|
|
|
int main(int ac, char **av)
|
2019-03-28 11:26:05 +00:00
|
|
|
{
|
2019-04-27 14:27:22 +00:00
|
|
|
std::srand(std::time(nullptr));
|
|
|
|
auto const arguments = parse_args(ac, av);
|
|
|
|
spdlog::set_level(arguments.verbose ? spdlog::level::debug
|
|
|
|
: spdlog::level::info);
|
|
|
|
spdlog::set_pattern("[thread %t] %+");
|
|
|
|
spdlog::debug("Input file:\t{}", arguments.input_path.native());
|
|
|
|
spdlog::debug("Output file:\t{}", arguments.output_path.native());
|
|
|
|
spdlog::debug("Iterations:\t{}", arguments.iterations);
|
2019-03-20 11:34:46 +00:00
|
|
|
|
2019-04-27 14:27:22 +00:00
|
|
|
ImageManipulator image_process{arguments.input_path, arguments.output_path,
|
|
|
|
arguments.iterations, arguments.shape};
|
|
|
|
image_process.exec_method(arguments.method, arguments.controlled_size,
|
|
|
|
arguments.cols, arguments.rows,
|
|
|
|
arguments.submethod);
|
|
|
|
image_process.write_file();
|
2019-03-19 09:14:19 +00:00
|
|
|
}
|