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
7
#include "
porytiles2/domain/models/image.hpp
"
8
#include "
porytiles2/domain/models/index_pixel.hpp
"
9
#include "
porytiles2/templates/result.hpp
"
10
11
namespace
porytiles2
{
12
19
class
PngIndexedImageLoader
final {
20
public
:
21
PngIndexedImageLoader
() =
default
;
22
23
[[nodiscard]]
Result<std::unique_ptr<Image<IndexPixel>
>>
load_from_file
(
const
std::filesystem::path &path)
const
;
24
};
25
26
}
// namespace porytiles2
porytiles2::PngIndexedImageLoader
An image loader that reads PNG files to create an Image with an index pixel type.
Definition
png_indexed_image_loader.hpp:19
porytiles2::PngIndexedImageLoader::load_from_file
Result< std::unique_ptr< Image< IndexPixel > > > load_from_file(const std::filesystem::path &path) const
Definition
png_indexed_image_loader.cpp:14
porytiles2::PngIndexedImageLoader::PngIndexedImageLoader
PngIndexedImageLoader()=default
image.hpp
index_pixel.hpp
porytiles2
Definition
app_config.hpp:10
porytiles2::Result
std::expected< T, E > Result
A result with some type T on success, otherwise an error of type E.
Definition
result.hpp:25
result.hpp
Porytiles2
include
porytiles2
infra
services
png_indexed_image_loader.hpp
Generated by
1.9.8