|
TinyGPU
|
Incremental BMP decoder for TinyGPU framebuffers. More...
#include <BMPParser.h>

Classes | |
| struct | HeaderInfo |
| Stores parsed BMP metadata. More... | |
Public Types | |
| enum class | Status { Collecting , Complete , Error } |
| Represents the parser status. More... | |
Public Member Functions | |
| BMPParser (ISurface< RGB_T > &target) | |
| Creates a parser that decodes into the provided framebuffer target. | |
| void | reset () |
| Resets the parser to decode a new BMP image. | |
| size_t | write (const uint8_t *data, size_t length) |
| Writes BMP data incrementally to the parser. | |
| size_t | write (uint8_t *data, size_t length) |
| Writes BMP data incrementally to the parser. | |
| bool | isComplete () const |
| Returns true when the full image has been decoded. | |
| bool | hasError () const |
| Returns true when parsing failed. | |
| Status | status () const |
| Returns the current parser status. | |
| size_t | width () const |
| Returns the decoded image width in pixels. | |
| size_t | height () const |
| Returns the decoded image height in pixels. | |
| const char * | errorMessage () const |
| Returns the latest error message, if any. | |
Protected Member Functions | |
| void | tryDecode () |
| bool | parseHeader (HeaderInfo &header) |
| bool | parseBitMasks (HeaderInfo &header) |
| bool | parsePalette (const HeaderInfo &header) |
| uint32_t | requiredDataSize (const HeaderInfo &header) const |
| bool | decode (const HeaderInfo &header) |
| bool | decodeRow (const HeaderInfo &header, size_t rowOffset, size_t targetY) |
| bool | decode8BitRow (size_t rowOffset, size_t targetY) |
| bool | decode16BitRow (const HeaderInfo &header, size_t rowOffset, size_t targetY) |
| bool | decode24BitRow (size_t rowOffset, size_t targetY) |
| bool | decode32BitRow (const HeaderInfo &header, size_t rowOffset, size_t targetY) |
| RGB565 | decodeMaskedPixel (uint32_t pixelValue, const HeaderInfo &header) const |
| uint16_t | readU16 (size_t offset) const |
| uint32_t | readU32 (size_t offset) const |
| int32_t | readS32 (size_t offset) const |
| void | setError (const char *message) |
Static Protected Member Functions | |
| static uint8_t | extractChannel (uint32_t pixelValue, uint32_t mask) |
| static uint32_t | bmpRowStride (uint16_t bitsPerPixel, size_t width) |
Protected Attributes | |
| ISurface< RGB_T > & | target_ |
| Vector< uint8_t > | buffer_ |
| Vector< RGB_T > | palette_ |
| Status | status_ = Status::Collecting |
| const char * | errorMessage_ = nullptr |
| size_t | imageWidth_ = 0 |
| size_t | imageHeight_ = 0 |
| bool | topDown_ = false |
Static Protected Attributes | |
| static constexpr uint32_t | kCompressionRgb = 0 |
| static constexpr uint32_t | kCompressionBitfields = 3 |
Incremental BMP decoder for TinyGPU framebuffers.
The parser accepts BMP file bytes through write(), buffers them until enough data is available, then decodes supported uncompressed BMP formats directly into the provided ISurface target using RGB565 pixels.
|
strong |
Creates a parser that decodes into the provided framebuffer target.
|
inlinestaticprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inline |
Returns the latest error message, if any.
|
inlinestaticprotected |
|
inline |
Returns true when parsing failed.
|
inline |
Returns the decoded image height in pixels.
|
inline |
Returns true when the full image has been decoded.
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inline |
Resets the parser to decode a new BMP image.
|
inlineprotected |
|
inline |
Returns the current parser status.
|
inlineprotected |
|
inline |
Returns the decoded image width in pixels.
|
inline |
Writes BMP data incrementally to the parser.
|
inline |
Writes BMP data incrementally to the parser.
|
protected |
|
protected |
|
protected |
|
protected |
|
staticconstexprprotected |
|
staticconstexprprotected |
|
protected |
|
protected |
|
protected |
|
protected |