mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-25 01:41:43 +00:00
Examples/spi_master: spiffier graphics
This commit is contained in:
14
examples/peripherals/spi_master/main/decode_image.h
Normal file
14
examples/peripherals/spi_master/main/decode_image.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
#include "esp_err.h"
|
||||
|
||||
/**
|
||||
* @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);
|
Reference in New Issue
Block a user