From 9e596db1210551b2c01104ccbc86c2c49c05cb39 Mon Sep 17 00:00:00 2001 From: kou1okada Date: Wed, 5 Oct 2016 11:14:00 +0900 Subject: [PATCH] ax203: ax206_compress_jpeg can use only "defined(HAVE_LIBGD) && defined(HAVE_LIBJPEG)" --- camlibs/ax203/ax203.c | 4 ++++ camlibs/ax203/ax203.h | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/camlibs/ax203/ax203.c b/camlibs/ax203/ax203.c index 51c12e135..4e0a6ec5d 100644 --- a/camlibs/ax203/ax203.c +++ b/camlibs/ax203/ax203.c @@ -1220,10 +1220,14 @@ ax203_encode_image(Camera *camera, int **src, char *dest, int dest_size) camera->pl->height); return size; case AX206_COMPRESSION_JPEG: +#if defined(HAVE_LIBGD) && defined(HAVE_LIBJPEG) return ax206_compress_jpeg (camera, src, (uint8_t *)dest, dest_size, camera->pl->width, camera->pl->height); +#else + return GP_ERROR_NOT_SUPPORTED; +#endif case AX3003_COMPRESSION_JPEG: #ifdef HAVE_LIBJPEG cinfo.err = jpeg_std_error (&jcerr); diff --git a/camlibs/ax203/ax203.h b/camlibs/ax203/ax203.h index 580b509f9..adbd54cec 100644 --- a/camlibs/ax203/ax203.h +++ b/camlibs/ax203/ax203.h @@ -195,8 +195,13 @@ ax203_decode_yuv_delta(char *src, int **dest, int width, int height); void ax203_encode_yuv_delta(int **src, char *dest, int width, int height); + +#if defined(HAVE_LIBGD) && defined(HAVE_LIBJPEG) + int ax206_compress_jpeg(Camera *camera, int **in, uint8_t *outbuf, int out_size, int width, int height); #endif + +#endif