diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-12-27 12:45:28 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-12-27 15:06:51 +0100 |
commit | 6975007f314a4c392e2cb616e7c3297ed167c2a7 (patch) | |
tree | f93ba7411656efb1d3387009db59597252af634e /source | |
parent | c21d2afbe921fb8b12e07a2eccdf7cf7a0e2bf61 (diff) | |
download | mupdf-6975007f314a4c392e2cb616e7c3297ed167c2a7.tar.xz |
Bug 697455: Make JPX support optional via configuration flag.
Set FZ_ENABLE_JPX=0 in XCFLAGS or include/mupdf/fitz/config.h to disable
support for JPX at compile time.
Be aware that this may break support for PDF 1.5 and later files that
need JPEG2000 support.
Diffstat (limited to 'source')
-rw-r--r-- | source/fitz/load-jpx.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/fitz/load-jpx.c b/source/fitz/load-jpx.c index ef99d154..9baad51d 100644 --- a/source/fitz/load-jpx.c +++ b/source/fitz/load-jpx.c @@ -1,5 +1,7 @@ #include "mupdf/fitz.h" +#if FZ_ENABLE_JPX + typedef struct fz_jpxd_s fz_jpxd; typedef struct stream_block_s stream_block; @@ -918,3 +920,19 @@ fz_load_jpx_info(fz_context *ctx, unsigned char *data, size_t size, int *wp, int } #endif /* HAVE_LURATECH */ + +#else /* FZ_ENABLE_JPX */ + +fz_pixmap * +fz_load_jpx(fz_context *ctx, unsigned char *data, size_t size, fz_colorspace *defcs) +{ + fz_throw(ctx, FZ_ERROR_GENERIC, "JPX support disabled"); +} + +void +fz_load_jpx_info(fz_context *ctx, unsigned char *data, size_t size, int *wp, int *hp, int *xresp, int *yresp, fz_colorspace **cspacep) +{ + fz_throw(ctx, FZ_ERROR_GENERIC, "JPX support disabled"); +} + +#endif |