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 {
39 class IGNITION_RENDERING_VISIBLE
Image
51 public:
Image(
unsigned int _width,
unsigned int _height,
59 public:
unsigned int Width()
const;
71 public:
unsigned int Depth()
const;
79 public:
const void *
Data()
const;
88 public:
template <
typename T>
89 const T *Data()
const;
94 public:
template <
typename T>
109 private:
unsigned int width = 0;
112 private:
unsigned int height = 0;
119 private:
DataPtr data =
nullptr;
124 template <
typename T>
127 return static_cast<const T *
>(this->data.get());
131 template <
typename T>
134 return static_cast<T *
>(this->data.get());
Posable camera used for rendering the scene graph.
Definition: gz/rendering/Camera.hh:52
Encapsulates a raw image buffer and relevant properties.
Definition: gz/rendering/Image.hh:40
Image()=default
Default constructor.
unsigned int MemorySize() const
Get image channel depth.
unsigned int Width() const
Get image width in pixels.
void * Data()
Get a pointer to image data.
unsigned int Depth() const
Get image channel depth.
unsigned int Height() const
Get image height in pixels.
const void * Data() const
Get a const pointer to image data.
PixelFormat Format() const
Get image pixel format.
Image(unsigned int _width, unsigned int _height, PixelFormat _format)
Constructor.
Non owning, writable view of a caller owned pixel buffer.
Definition: gz/rendering/PixelBuffer.hh:49
#define IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
#define IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
PixelFormat
Image pixel format types.
Definition: gz/rendering/PixelFormat.hh:33
@ PF_UNKNOWN
< Unknown or errant type
Definition: gz/rendering/PixelFormat.hh:35