Represents an image, typically as returned by the CameraDevice.
The image's pixel buffer may have a different size than expected based on the return values from getWidth() and getHeight(). This typically happens when case when an image is used for rendering as a texture without non-power-of-two support.
If you need the actual size of the image's pixel buffer, call getBufferWidth() and getBufferHeight().
Public Member Functions | |
virtual int | getWidth () const =0 |
Get the width of the image in pixels. More... | |
virtual int | getHeight () const =0 |
Get the height of the image in pixels. More... | |
virtual int | getStride () const =0 |
Get the number of bytes between the start of a pixel row and the start of the next. More... | |
virtual int | getBufferWidth () const =0 |
Get the width (number of columns) of the underlying pixel buffer. More... | |
virtual int | getBufferHeight () const =0 |
Get the height (number of rows) of the underlying pixel buffer. More... | |
virtual PIXEL_FORMAT | getFormat () const =0 |
Get the pixel format of the image. More... | |
virtual const void * | getPixels () const =0 |
Get a pointer to the start of the underlying pixel buffer. More... | |
Protected Member Functions | |
virtual | ~Image () |
|
inlineprotectedvirtual |
|
pure virtual |
Get the width of the image in pixels.
|
pure virtual |
Get the height of the image in pixels.
|
pure virtual |
Get the number of bytes between the start of a pixel row and the start of the next.
Typically, the stride is (numberOfPixels * bytesPerPixel).
However, in some cases there may be additional padding at the end of a row (for example to pad the image data to a power-of-two size).
|
pure virtual |
Get the width (number of columns) of the underlying pixel buffer.
Typically, this is the same as getWidth().
However, in some cases there may be additional padding at the end of a row (for example to pad the image data to a power-of-two size).
|
pure virtual |
Get the height (number of rows) of the underlying pixel buffer.
Typically, this is the same as getHeight().
However, in some cases there may be additional padding rows at the bottom of an image (for example to pad the image data to a power-of-two size).
|
pure virtual |
Get the pixel format of the image.
|
pure virtual |
Get a pointer to the start of the underlying pixel buffer.
The returned buffer is (getBufferHeight() * getStride()) bytes in size.