Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
Image.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_UI_GRAPHICS_IMAGE_HPP_
2#define IV_SRC_UI_GRAPHICS_IMAGE_HPP_
3
4#include "core/types.hpp"
5
6#include <memory>
7
8namespace iv::ui::graphics
9{
10
11class Image final
12{
13public:
14 Image();
17 iv::types::nChannels nChannels, const unsigned char *buffer);
18 Image(const Image &other); // Copy constructor
19 Image(Image &&other) noexcept;// Move constructor
21
22 Image &operator=(const Image &other); // Copy assignment operator
23 Image &operator=(Image &&other) noexcept;// Move assignment operator
24
25 const unsigned char *getDataRaw(iv::types::imageWidth *width, iv::types::imageHeight *height,
26 iv::types::widthStep *widthStep, iv::types::nChannels *nChannels) const;
27 void getSize(iv::types::imageWidth *sizeX, iv::types::imageHeight *sizeY) const;
28
29private:
30 std::unique_ptr<unsigned char[]> m_imageData;
31
35};
36
37}// namespace iv::ui::graphics
38
39#endif//IV_SRC_UI_GRAPHICS_IMAGE_HPP_
Definition Image.hpp:12
Image()
Definition Image.cpp:8
iv::types::nChannels m_nChannels
Definition Image.hpp:34
iv::types::widthStep m_widthStep
Definition Image.hpp:33
void getSize(iv::types::imageWidth *sizeX, iv::types::imageHeight *sizeY) const
Definition Image.cpp:96
iv::types::ImageSize m_size
Definition Image.hpp:32
std::unique_ptr< unsigned char[]> m_imageData
Definition Image.hpp:30
Image & operator=(const Image &other)
Definition Image.cpp:41
const unsigned char * getDataRaw(iv::types::imageWidth *width, iv::types::imageHeight *height, iv::types::widthStep *widthStep, iv::types::nChannels *nChannels) const
Definition Image.cpp:70
uint64_t imageHeight
Definition types.hpp:57
uint64_t imageWidth
Definition types.hpp:58
uint16_t nChannels
Definition types.hpp:60
uint64_t widthStep
Definition types.hpp:59
Definition Image.cpp:6
Definition types.hpp:145