|
ESPHome 2026.9.0-dev
|
Image decoder specialization for PNG images. More...
#include <png_decoder.h>
Public Member Functions | |
| PngDecoder (RuntimeImage *image) | |
| Construct a new PNG Decoder object. | |
| ~PngDecoder () override | |
| void | reset () override |
| int | prepare (size_t expected_size) override |
| int HOT | decode (uint8_t *buffer, size_t size) override |
| void | increment_pixels_decoded (uint32_t count) |
| uint32_t | get_pixels_decoded () const |
Public Member Functions inherited from esphome::runtime_image::ImageDecoder | |
| ImageDecoder (RuntimeImage *image, ImageFormat format) | |
| Construct a new Image Decoder object. | |
| virtual | ~ImageDecoder ()=default |
| ImageFormat | get_format () const |
| Get the image format handled by this decoder. | |
| bool | is_active () const |
| Check if a decoding session is in progress (prepare() called, reset() not yet). | |
| bool | set_size (int width, int height) |
| Request the image to be resized once the actual dimensions are known. | |
| void | draw (int x, int y, int w, int h, const Color &color) |
| Fill a rectangle on the display_buffer using the defined color. | |
| virtual bool | is_finished () const |
| Check if the decoder has finished processing. | |
Protected Attributes | |
| pngle_t * | pngle_ {nullptr} |
| uint32_t | pixels_decoded_ {0} |
Protected Attributes inherited from esphome::runtime_image::ImageDecoder | |
| double | x_scale_ = 1.0 |
| double | y_scale_ = 1.0 |
| RuntimeImage * | image_ |
| size_t | expected_size_ = 0 |
| size_t | decoded_bytes_ = 0 |
| const ImageFormat | format_ |
| bool | active_ = false |
| bool | size_valid_ = true |
Image decoder specialization for PNG images.
Definition at line 15 of file png_decoder.h.
| esphome::runtime_image::PngDecoder::PngDecoder | ( | RuntimeImage * | image | ) |
Construct a new PNG Decoder object.
| image | The RuntimeImage to decode the stream into. |
Definition at line 51 of file png_decoder.cpp.
|
override |
Definition at line 65 of file png_decoder.cpp.
|
overridevirtual |
Implements esphome::runtime_image::ImageDecoder.
Definition at line 86 of file png_decoder.cpp.
|
inline |
Definition at line 37 of file png_decoder.h.
|
inline |
Definition at line 36 of file png_decoder.h.
|
overridevirtual |
Reimplemented from esphome::runtime_image::ImageDecoder.
Definition at line 73 of file png_decoder.cpp.
|
inlineoverridevirtual |
Reimplemented from esphome::runtime_image::ImageDecoder.
Definition at line 25 of file png_decoder.h.
|
protected |
Definition at line 41 of file png_decoder.h.
|
protected |
Definition at line 40 of file png_decoder.h.