mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
d899ef0c80
(cherry picked from commit 2153a583ee
)
24 lines
744 B
C
24 lines
744 B
C
/*
|
|
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
|
*
|
|
* SPDX-License-Identifier: CC0-1.0
|
|
*/
|
|
|
|
#pragma once
|
|
#include <stdint.h>
|
|
#include "esp_err.h"
|
|
|
|
#define IMAGE_W 320
|
|
#define IMAGE_H 240
|
|
|
|
/**
|
|
* @brief Decode the jpeg ``image.jpg`` embedded into the program file into pixel data.
|
|
*
|
|
* @param pixels A pointer to a pointer for an array of rows, which themselves are an array of pixels.
|
|
* Effectively, you can get the pixel data by doing ``decode_image(&myPixels); pixelval=myPixels[ypos][xpos];``
|
|
* @return - ESP_ERR_NOT_SUPPORTED if image is malformed or a progressive jpeg file
|
|
* - ESP_ERR_NO_MEM if out of memory
|
|
* - ESP_OK on succesful decode
|
|
*/
|
|
esp_err_t decode_image(uint16_t **pixels);
|