WebVfx  0.4.4-44-ga54b093
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
Public Member Functions | Static Public Attributes | List of all members
WebVfx::Image Class Reference

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, bool hasAlpha=false)
 

Static Public Attributes

static const int BytesPerPixel = 3
 Number of bytes per pixel.
 

Detailed Description

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.

Constructor & Destructor Documentation

WebVfx::Image::Image ( unsigned char *  pixels,
int  width,
int  height,
int  byteCount,
bool  hasAlpha = false 
)
inline
Parameters
pixels24 bit RGB image data. Must be valid for the lifetime of the Image.
widthWidth of the image in pixels
heightHeight of the image in pixels
byteCountNumber of bytes in the image. A row can have more than width * BytesPerPixel bytes.

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