1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 22:53:59 +00:00

[online_image] Add binary bmp support (#8116)

Co-authored-by: guillempages <guillempages@users.noreply.github.com>
This commit is contained in:
Jesse Hills
2025-01-23 15:10:19 +13:00
committed by GitHub
parent dee1d84979
commit 7fccc9ff86
9 changed files with 187 additions and 8 deletions

View File

@@ -4,6 +4,12 @@
namespace esphome {
namespace online_image {
enum DecodeError : int {
DECODE_ERROR_INVALID_TYPE = -1,
DECODE_ERROR_UNSUPPORTED_FORMAT = -2,
DECODE_ERROR_OUT_OF_MEMORY = -3,
};
class OnlineImage;
/**
@@ -45,8 +51,9 @@ class ImageDecoder {
*
* @param width The image's width.
* @param height The image's height.
* @return true if the image was resized, false otherwise.
*/
void set_size(int width, int height);
bool set_size(int width, int height);
/**
* @brief Fill a rectangle on the display_buffer using the defined color.