Go to the documentation of this file.
17 #ifndef GZ_RENDERING_IMAGE_HH_
18 #define GZ_RENDERING_IMAGE_HH_
22 #include <gz/common/SuppressWarning.hh>
24 #include "gz/rendering/config.hh"
26 #include "gz/rendering/Export.hh"
32 inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
36 class IGNITION_RENDERING_VISIBLE
Image
42 public:
Image() =
default;
48 public:
Image(
unsigned int _width,
unsigned int _height,
56 public:
unsigned int Width()
const;
60 public:
unsigned int Height()
const;
68 public:
unsigned int Depth()
const;
72 public:
unsigned int MemorySize()
const;
76 public:
const void *Data()
const;
85 public:
template <
typename T>
86 const T *Data()
const;
91 public:
template <
typename T>
95 private:
unsigned int width = 0;
98 private:
unsigned int height = 0;
105 private:
DataPtr data =
nullptr;
110 template <
typename T>
113 return static_cast<const T *
>(this->data.get());
117 template <
typename T>
120 return static_cast<T *
>(this->data.get());
#define IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
PixelFormat
Image pixel format types.
Definition: gz/rendering/PixelFormat.hh:32
Encapsulates a raw image buffer and relevant properties.
Definition: gz/rendering/Image.hh:36
unsigned int Height() const
Get image height in pixels.
const void * Data() const
Get a const pointer to image data.
unsigned int Width() const
Get image width in pixels.
unsigned int MemorySize() const
Get image channel depth.
Image()=default
Default constructor.
PixelFormat Format() const
Get image pixel format.
@ PF_UNKNOWN
< Unknown or errant type
Definition: gz/rendering/PixelFormat.hh:35
#define IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
unsigned int Depth() const
Get image channel depth.