diff options
Diffstat (limited to 'src/image_processor.hh')
| -rw-r--r-- | src/image_processor.hh | 29 |
1 files changed, 29 insertions, 0 deletions
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 <filesystem> +#include <memory> +#include <optional> + +namespace image_processor { + +[[nodiscard]] +std::expected<Size, ImageLoadError> peek(Process& process, + std::filesystem::path const& path); + +[[nodiscard]] +std::expected<std::unique_ptr<Image>, ImageLoadError> load( + Process& process, std::filesystem::path const& path, Image::Format format, + uint32_t max_width = 0, uint32_t max_height = 0, + std::optional<Colour> background = std::nullopt); + +int run(std::unique_ptr<io::Reader> reader, std::unique_ptr<io::Writer> writer); + +} // namespace image_processor + +#endif // IMAGE_PROCESSOR_HH |
