diff options
Diffstat (limited to 'src/lib/jpeg.h')
-rw-r--r-- | src/lib/jpeg.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/lib/jpeg.h b/src/lib/jpeg.h index d2e9e5ffcf..c5179c8c4f 100644 --- a/src/lib/jpeg.h +++ b/src/lib/jpeg.h @@ -5,12 +5,13 @@ #include <stdlib.h> -#define JPEG_DECODE_FAILED 1 +/* These functions return NULL on success and a short error message on + * failure. Callers should not free the returned pointer. */ -int jpeg_fetch_size(unsigned char *filedata, size_t filesize, unsigned int *width, - unsigned int *height); -int jpeg_decode(unsigned char *filedata, size_t filesize, unsigned char *framebuffer, - unsigned int width, unsigned int height, unsigned int bytes_per_line, - unsigned int depth); +const char *jpeg_fetch_size(unsigned char *filedata, size_t filesize, unsigned int *width, + unsigned int *height); +const char *jpeg_decode(unsigned char *filedata, size_t filesize, unsigned char *framebuffer, + unsigned int width, unsigned int height, unsigned int bytes_per_line, + unsigned int depth); #endif |