Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
ExrLoader.h
Go to the documentation of this file.
1#pragma once
2#include <tiny_gltf.h>
3#include "tinyexr.h"
4#include <vector>
5#include <filesystem>
6#include <string>
7
8namespace EngineCore {
16 std::string name;
28 unsigned char p_linear;
31 };
32
42 struct ExrHeader {
43 ExrHeader() = default;
44
50 explicit ExrHeader(EXRHeader header);
51
52 std::string name;
55 int num_channels = 0;
61 std::vector<ExrChannelInfo> channels;
64
65 bool valid = false;
68 };
69
81 class ExrLoader {
82 public:
83 ExrLoader() = default;
84
85 ~ExrLoader() = default;
86
101 tinygltf::Image load(const std::filesystem::path &filename);
102
116 [[nodiscard]] ExrHeader loadHeader(std::filesystem::path path);
117 };
118}
tinygltf::Image load(const std::filesystem::path &filename)
Load a complete EXR image file.
Definition ExrLoader.cpp:40
ExrHeader loadHeader(std::filesystem::path path)
Load only the header information from an EXR file.
Log category system implementation.
Represents channel information from an EXR file header.
Definition ExrLoader.h:15
int pixel_type
< Channel name (e.g., "R", "G", "B", "A") std::string name;
Definition ExrLoader.h:19
unsigned char p_linear
< Sampling rate in Y direction int y_sampling;
Definition ExrLoader.h:28
int x_sampling
< Pixel type (TINYEXR_PIXELTYPE_HALF, FLOAT, etc.) int pixel_type;
Definition ExrLoader.h:22
int y_sampling
< Sampling rate in X direction int x_sampling;
Definition ExrLoader.h:25
Wrapper for EXR file header information with owned data.
Definition ExrLoader.h:42
bool valid
< Channel information for each channel std::vector<ExrChannelInfo> channels;
Definition ExrLoader.h:65
std::vector< ExrChannelInfo > channels
< Compression type used int compression_type = 0;
Definition ExrLoader.h:61
int num_channels
< Image name/identifier std::string name;
Definition ExrLoader.h:55
int compression_type
< Number of color channels int num_channels = 0;
Definition ExrLoader.h:58