WebVfx
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
 

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(A) 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

◆ Image()

WebVfx::Image::Image ( unsigned char *  pixels,
int  width,
int  height,
int  byteCount,
bool  hasAlpha = false 
)
inline
Parameters
pixels24-bit RGB or 32-bit RGBA 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.

Member Data Documentation

◆ BytesPerPixel

const int WebVfx::Image::BytesPerPixel = 3
static
Deprecated:
Number of bytes per pixel.

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