3 #ifdef USE_ONLINE_IMAGE_BMP_SUPPORT 10 namespace online_image {
12 static const char *
const TAG =
"online_image.bmp";
28 if (buffer[0] !=
'B' || buffer[1] !=
'M') {
29 ESP_LOGE(TAG,
"Not a BMP file");
81 while (index < size) {
84 uint8_t current_byte = buffer[index];
85 for (uint8_t i = 0; i < 8; i++) {
86 size_t x = (paint_index * 8) % this->
width_ + i;
89 this->
draw(x, y, 1, 1, c);
101 #endif // USE_ONLINE_IMAGE_BMP_SUPPORT int HOT decode(uint8_t *buffer, size_t size) override
const Color COLOR_OFF(0, 0, 0, 0)
Turn the pixel OFF.
constexpr uint32_t encode_uint32(uint8_t byte1, uint8_t byte2, uint8_t byte3, uint8_t byte4)
Encode a 32-bit value given four bytes in most to least significant byte order.
uint32_t color_table_entries_
uint32_t image_data_size_
constexpr uint16_t encode_uint16(uint8_t msb, uint8_t lsb)
Encode a 16-bit value given the most and least significant byte.
void draw(int x, int y, int w, int h, const Color &color)
Fill a rectangle on the display_buffer using the defined color.
bool set_size(int width, int height)
Request the image to be resized once the actual dimensions are known.
const Color COLOR_ON(255, 255, 255, 255)
Turn the pixel ON.
Implementation of SPI Controller mode.
uint32_t compression_method_