summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Meissner <meissner@suse.de>2016-10-05 07:51:21 +0200
committerGitHub <noreply@github.com>2016-10-05 07:51:21 +0200
commitec0218827fb3cbb10fda0c86178ee888c4037aeb (patch)
treecb9df26bb8508cb4d7cba883299975baafd326b4
parent6ac3133632434a27a62996427dabca5de7b5bd23 (diff)
parent9e596db1210551b2c01104ccbc86c2c49c05cb39 (diff)
downloadlibgphoto2-ec0218827fb3cbb10fda0c86178ee888c4037aeb.tar.gz
Merge pull request #95 from kou1okada/master
ax203: ax206_compress_jpeg can use only "defined(HAVE_LIBGD) && defined(HAVE_LIBJPEG)"
-rw-r--r--camlibs/ax203/ax203.c4
-rw-r--r--camlibs/ax203/ax203.h5
2 files changed, 9 insertions, 0 deletions
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