Porytiles
Loading...
Searching...
No Matches
png_indexed_image_loader.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <filesystem>
5#include <memory>
6
10
11namespace porytiles2 {
12
20 public:
22
23 [[nodiscard]] Result<std::unique_ptr<Image<IndexPixel>>> load_from_file(const std::filesystem::path &path) const;
24};
25
26} // namespace porytiles2
An image loader that reads PNG files to create an Image with an index pixel type.
Result< std::unique_ptr< Image< IndexPixel > > > load_from_file(const std::filesystem::path &path) const
std::expected< T, E > Result
A result with some type T on success, otherwise an error of type E.
Definition result.hpp:25