46 bool savePNG(
const std::string& path)
const;
49 bool savePNG(
const std::wstring& path)
const;
CPU-side image buffer storing BGRA pixel data.
std::vector< uint8_t > pixels_
void composite(const SoftwareImage &src, int destX, int destY, int blendMode=1)
Composite a source image onto this image at the given position.
SoftwareImage mirrored() const
Return a vertically mirrored copy.
bool savePNG(const std::string &path) const
Save as PNG to the given file path.
bool empty() const
True if the image has zero dimensions.
void assign(const SoftwareImage &src)
Replace contents entirely with a copy of src.
static SoftwareImage loadFromMemory(const uint8_t *data, int size)
Load a JPEG image from a memory buffer.
SoftwareImage scaled(int newWidth, int newHeight) const
Return a scaled copy using bilinear interpolation.
const uint8_t * data() const
Const pointer to the raw BGRA pixel buffer.
int height() const
Image height in pixels.
uint8_t * data()
Mutable pointer to the raw BGRA pixel buffer.
int width() const
Image width in pixels.