From c3a1de8c7b07baba080951e6433fc34aed74a222 Mon Sep 17 00:00:00 2001 From: Johns Date: Wed, 8 Feb 2012 22:32:47 +0100 Subject: [PATCH] jpeg_mem_dest only supported by jpeg 8.0. --- softhddev.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/softhddev.c b/softhddev.c index 33ed15b..77e026f 100644 --- a/softhddev.c +++ b/softhddev.c @@ -940,8 +940,20 @@ int PlayVideo(const uint8_t * data, int size) return size; } -#ifdef USE_JPEG +#if defined(USE_JPEG) && JPEG_LIB_VERSION >= 80 +/** +** Create a jpeg image in memory. +** +** @param image raw RGB image +** @param raw_size size of raw image +** @param size[out] size of jpeg image +** @param quality jpeg quality +** @param width number of horizontal pixels in image +** @param height number of vertical pixels in image +** +** @returns allocated jpeg image. +*/ uint8_t *CreateJpeg(uint8_t * image, int raw_size, int *size, int quality, int width, int height) { @@ -994,7 +1006,7 @@ uint8_t *CreateJpeg(uint8_t * image, int raw_size, int *size, int quality, uint8_t *GrabImage(int *size, int jpeg, int quality, int width, int height) { if (jpeg) { -#ifdef USE_JPEG +#if defined(USE_JPEG) && JPEG_LIB_VERSION >= 80 int raw_size; uint8_t *image; uint8_t *jpg_image;