Gazebo Rendering

API Reference

9.0.0

Encapsulates a raw image buffer and relevant properties. More...

#include <gz/rendering/Image.hh>

Public Member Functions

 Image ()
 Default constructor.
 
 Image (unsigned int _width, unsigned int _height, PixelFormat _format)
 Constructor.
 
virtual ~Image ()
 Destructor.
 
void * Data ()
 Get a pointer to image data.
 
template<typename T >
T * Data ()
 Get a pointer to image data. The returned image buffer will be statically cast to the given template type T.
 
const void * Data () const
 Get a const pointer to image data.
 
template<typename T >
const T * Data () const
 Get a const pointer to image data. The returned image buffer will be statically cast to the given template type T.
 
unsigned int Depth () const
 Get image channel depth.
 
PixelFormat Format () const
 Get image pixel format.
 
unsigned int Height () const
 Get image height in pixels.
 
unsigned int MemorySize () const
 Get image channel depth.
 
unsigned int Width () const
 Get image width in pixels.
 

Detailed Description

Encapsulates a raw image buffer and relevant properties.

Constructor & Destructor Documentation

◆ Image() [1/2]

Image ( )

Default constructor.

◆ Image() [2/2]

Image ( unsigned int  _width,
unsigned int  _height,
PixelFormat  _format 
)

Constructor.

Parameters
[in]_widthImage width in pixels
[in]_heightImage height in pixels
[in]_formatImage pixel format

◆ ~Image()

virtual ~Image ( )
virtual

Destructor.

Member Function Documentation

◆ Data() [1/4]

void * Data ( )

Get a pointer to image data.

Returns
The pointer to image data

◆ Data() [2/4]

template<typename T >
T * Data ( )

Get a pointer to image data. The returned image buffer will be statically cast to the given template type T.

Returns
The pointer to image data

References Image::Data().

◆ Data() [3/4]

const void * Data ( ) const

Get a const pointer to image data.

Returns
The const pointer to image data

Referenced by Image::Data(), and Image::Data().

◆ Data() [4/4]

template<typename T >
const T * Data ( ) const

Get a const pointer to image data. The returned image buffer will be statically cast to the given template type T.

Returns
The const pointer to image data

References Image::Data().

◆ Depth()

unsigned int Depth ( ) const

Get image channel depth.

Returns
The image channel depth

◆ Format()

PixelFormat Format ( ) const

Get image pixel format.

Returns
The image pixel format

◆ Height()

unsigned int Height ( ) const

Get image height in pixels.

Returns
The image height in pixels

◆ MemorySize()

unsigned int MemorySize ( ) const

Get image channel depth.

Returns
The image channel depth

◆ Width()

unsigned int Width ( ) const

Get image width in pixels.

Returns
The image width in pixels

The documentation for this class was generated from the following file: