From 6ed8f5151719fbc14ec0ac6d28a346d1f74cf2ca Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Fri, 2 Jan 2026 22:42:31 +0100 Subject: Initial commit --- src/image_processor.hh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/image_processor.hh (limited to 'src/image_processor.hh') diff --git a/src/image_processor.hh b/src/image_processor.hh new file mode 100644 index 0000000..551ac4f --- /dev/null +++ b/src/image_processor.hh @@ -0,0 +1,29 @@ +#ifndef IMAGE_PROCESSOR_HH +#define IMAGE_PROCESSOR_HH + +#include "colour.hh" +#include "image_loader.hh" +#include "io.hh" +#include "spawner.hh" + +#include +#include +#include + +namespace image_processor { + +[[nodiscard]] +std::expected peek(Process& process, + std::filesystem::path const& path); + +[[nodiscard]] +std::expected, ImageLoadError> load( + Process& process, std::filesystem::path const& path, Image::Format format, + uint32_t max_width = 0, uint32_t max_height = 0, + std::optional background = std::nullopt); + +int run(std::unique_ptr reader, std::unique_ptr writer); + +} // namespace image_processor + +#endif // IMAGE_PROCESSOR_HH -- cgit v1.2.3-70-g09d2