This commit is contained in:
2026-11-16 09:28:38 +03:00
parent 276dbdad8a
commit 580b33efe8
99 changed files with 23335 additions and 27 deletions
+24
View File
@@ -0,0 +1,24 @@
#include "image_pipeline.hpp"
#include <fstream>
#include <iostream>
#include <iterator>
int main(int argc, char** argv) {
if (argc != 3) {
std::cerr << "usage: thumbnail_smoke INPUT OUTPUT.jpg\n";
return 2;
}
try {
std::ifstream input(argv[1], std::ios::binary);
if (!input) return 1;
const std::vector<std::uint8_t> bytes((std::istreambuf_iterator<char>(input)), {});
const auto image = make_thumbnail(bytes);
std::ofstream output(argv[2], std::ios::binary);
output.write(image.bytes.data(), image.bytes.size());
if (!output) return 1;
std::cout << image.width << 'x' << image.height << '\n';
} catch (const std::exception& e) {
std::cerr << e.what() << '\n';
return 1;
}
}