mirror of
https://github.com/m5stack/StackChan.git
synced 2026-04-28 11:27:59 +00:00
5001b7081b
* add firmware source code
19 lines
525 B
C++
19 lines
525 B
C++
#pragma once
|
|
#include <cstdint>
|
|
#include <cstddef>
|
|
#include <memory>
|
|
#include <lvgl_image.h>
|
|
|
|
namespace jpeg_dec {
|
|
|
|
/**
|
|
* @brief Decodes a JPEG buffer to RGB565 format suitable for LVGL.
|
|
*
|
|
* @param jpeg_data Pointer to the JPEG data.
|
|
* @param jpeg_len Length of the JPEG data.
|
|
* @return std::shared_ptr<LvglAllocatedImage> The decoded image wrapped in LvglAllocatedImage, or nullptr on failure.
|
|
*/
|
|
std::shared_ptr<LvglAllocatedImage> decode_to_lvgl(const uint8_t* jpeg_data, size_t jpeg_len);
|
|
|
|
} // namespace jpeg_dec
|