WebVfx 0.1.6-6-g5144893-dirty
|
Lightweight class for passing around a reference to a buffer of raw image data. More...
#include <image.h>
Public Member Functions | |
Image (unsigned char *pixels, int width, int height, int byteCount) | |
Static Public Attributes | |
static const int | BytesPerPixel = 3 |
Number of bytes per pixel. |
Lightweight class for passing around a reference to a buffer of raw image data.
Image is a wrapper around a buffer of RGB image data, along with metadata about it (width, height, bytes per row etc.). The underlying image data buffer is not owned by Image and its lifetime must exceed that of the referencing Image instance.
WebVfx::Image::Image | ( | unsigned char * | pixels, |
int | width, | ||
int | height, | ||
int | byteCount | ||
) | [inline] |
pixels | 24 bit RGB image data. Must be valid for the lifetime of the Image. |
width | Width of the image in pixels |
height | Height of the image in pixels |
byteCount | Number of bytes in the image. A row can have more than width * BytesPerPixel bytes. |