This class implements read and write functions for BMP images.
More...
This class implements read and write functions for BMP images.
◆ decodeImage()
static Frame Ocean::Media::Special::ImageBmp::decodeImage |
( |
const void * |
buffer, |
|
|
const size_t |
size |
|
) |
| |
|
static |
Decodes a BMP image from a given binary buffer.
- Parameters
-
buffer | The buffer from which the image will be loaded, must be valid |
size | The size of the given buffer in bytes, with range [1, infinity) |
- Returns
- The frame containing the image information, an invalid frame if the image could not be loaded
◆ encodeImage()
static bool Ocean::Media::Special::ImageBmp::encodeImage |
( |
const Frame & |
frame, |
|
|
std::vector< uint8_t > & |
buffer, |
|
|
const bool |
allowConversion = true , |
|
|
bool * |
hasBeenConverted = nullptr |
|
) |
| |
|
static |
Encodes a given frame as BMP image to a resulting buffer.
- Parameters
-
frame | The frame to be written, must be valid |
buffer | The resulting buffer storing the binary information of the BMP image |
allowConversion | True, to allow an internal conversion of the frame if BMP does not support the given frame type; False, to prevent a conversion and to stop creating the buffer |
hasBeenConverted | Optional resulting statement whether the frame had to be converted to a different pixel format before it could be written; True, if so; False, if not |
- Returns
- True, if succeeded; False, if the frame could not be written as BMP image e.g., if the frame contained an alpha channel
◆ isFrameTypeSupported()
Returns whether a given pixel format together with a given pixel origin is supported natively.
- Parameters
-
pixelFormat | The pixel format to be checked |
pixelOrigin | The pixel origin to be checked |
- Returns
- True, if so; False, if a conversion will be necessary
◆ isPixelFormatSupported()
Returns whether a given pixel format is supported natively.
- Parameters
-
pixelFormat | The pixel format to be checked |
- Returns
- True, if so; False, if a conversion will be necessary
◆ isPixelOriginSupported()
Returns whether a given pixel origin is supported natively.
- Parameters
-
pixelOrigin | The pixel origin to be checked |
- Returns
- True, if so; False, if a conversion will be necessary
The documentation for this class was generated from the following file: