Files
StackChan/firmware/main/hal/utils/jpeg_to_image/jpeg_decoder.h
T
Forairaaaaa 5001b7081b add firmware source code (#4)
* add firmware source code
2026-01-08 09:18:20 +08:00

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