mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
ac069bfca1
Move the lcd example files out of the folder spi_master, and refactor the codes with esp_lcd driver. Add image rotation function to the example.
23 lines
868 B
C
23 lines
868 B
C
/*
|
|
This example code is in the Public Domain (or CC0 licensed, at your option.)
|
|
|
|
Unless required by applicable law or agreed to in writing, this
|
|
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
CONDITIONS OF ANY KIND, either express or implied.
|
|
*/
|
|
|
|
#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);
|