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