cae
0.0.0
Cross-API graphics engine
Loading...
Searching...
No Matches
Image.hpp
Go to the documentation of this file.
1
///
2
/// @file Image.hpp
3
/// @brief This file contains image struct
4
/// @namespace utl
5
///
6
7
#pragma once
8
9
#include <filesystem>
10
11
namespace
utl
12
{
13
14
///
15
/// @struct Image
16
/// @brief Struct for image
17
/// @namespace utl
18
///
19
struct
Image
20
{
21
22
using
pixel
=
unsigned
char
*;
23
24
///
25
/// @param path Path to the image file
26
/// @param flip Whether to flip the image vertically
27
/// @brief Load an image from a file
28
///
29
explicit
Image
(
const
std::filesystem::path &path,
bool
flip =
false
);
30
~Image
();
31
32
pixel
pixels
=
nullptr
;
33
int
width
= 0;
34
int
height
= 0;
35
int
channels
= 0;
36
37
};
// struct Image
38
39
}
// namespace utl
utl
utl::Image
Struct for image.
Definition
Image.hpp:20
utl::Image::~Image
~Image()
Definition
image.cpp:21
utl::Image::pixel
unsigned char * pixel
Definition
Image.hpp:22
utl::Image::Image
Image(const std::filesystem::path &path, bool flip=false)
Load an image from a file.
Definition
image.cpp:8
utl::Image::height
int height
Definition
Image.hpp:34
utl::Image::pixels
pixel pixels
Definition
Image.hpp:32
utl::Image::width
int width
Definition
Image.hpp:33
utl::Image::channels
int channels
Definition
Image.hpp:35
modules
Utils
include
Utils
Image.hpp
Generated by
1.11.0