| 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #ifndef __JPEG_H |
| 4 | #define __JPEG_H |
| 5 | |
| 6 | #include <stdlib.h> |
| 7 | |
| 8 | /* These functions return NULL on success and a short error message on |
| 9 | * failure. Callers should not free the returned pointer. */ |
| 10 | |
| 11 | const char *jpeg_fetch_size(unsigned char *filedata, size_t filesize, unsigned int *width, |
| 12 | unsigned int *height); |
| 13 | const char *jpeg_decode(unsigned char *filedata, size_t filesize, unsigned char *framebuffer, |
| 14 | unsigned int width, unsigned int height, unsigned int bytes_per_line, |
| 15 | unsigned int depth); |
| 16 | |
| 17 | #endif |