BLImage Class Reference

2D raster image [C++ API].

Member Functions

Construction & Destruction
Operator Overloads
Common Functionality
Create Functionality
Image Data
Image Utilities
Image IO

Static Functions

Additional Inherited Members

- Public Attributes inherited from BLImageCore

Member Function Documentation

BLResult BLImage::assignDeep(const BLImage& other)

Create a deep copy of the other image.

bool BLImage::isNone() const

Tests whether the image is a built-in null instance.

bool BLImage::empty() const

Tests whether the image is empty (has no size).

BLResult BLImage::create(int w, int h, uint32_t format)

Create a new image of a specified width w, height h, and format.

Note
It's important to always test whether the function succeeded as allocating pixel-data can fail. If invalid arguments (invalid size or format) were passed to the function a BL_ERROR_INVALID_VALUE result will be returned and no data will be allocated. It's also important to notice that BLImage::create() would not change anything if the function fails (the previous image content would be kept as is).

BLResult BLImage::createFromData(int w, int h, uint32_t format, void* pixelData, intptr_t stride, BLDestroyImplFunc destroyFunc = nullptr, void* destroyData = nullptr)

Create a new image from external data.

int BLImage::width() const

Returns image width.

int BLImage::height() const

Returns image height.

const BLSizeI& BLImage::size() const

Returns image size.

uint32_t BLImage::format() const

Returns image format, see BLFormat.