diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/fitz/image.c | 4 | ||||
-rw-r--r-- | source/fitz/load-jxr.c | 15 |
2 files changed, 17 insertions, 2 deletions
diff --git a/source/fitz/image.c b/source/fitz/image.c index 10a8bda4..2144674a 100644 --- a/source/fitz/image.c +++ b/source/fitz/image.c @@ -273,7 +273,7 @@ fz_image_get_pixmap(fz_context *ctx, fz_image *image, int w, int h) tile = fz_load_tiff(ctx, image->buffer->buffer->data, image->buffer->buffer->len); break; case FZ_IMAGE_JXR: - fz_throw(ctx, FZ_ERROR_GENERIC, "JPEG-XR codec is not available"); + tile = fz_load_jxr(ctx, image->buffer->buffer->data, image->buffer->buffer->len); break; default: native_l2factor = l2factor; @@ -468,7 +468,7 @@ fz_new_image_from_buffer(fz_context *ctx, fz_buffer *buffer) else if (memcmp(buf, "II", 2) == 0 && buf[2] == 0xBC) { bc->params.type = FZ_IMAGE_JXR; - fz_throw(ctx, FZ_ERROR_GENERIC, "JPEG-XR codec is not available"); + fz_load_jxr_info(ctx, buf, len, &w, &h, &xres, &yres, &cspace); } else if (memcmp(buf, "MM", 2) == 0 || memcmp(buf, "II", 2) == 0) { diff --git a/source/fitz/load-jxr.c b/source/fitz/load-jxr.c new file mode 100644 index 00000000..00c0568f --- /dev/null +++ b/source/fitz/load-jxr.c @@ -0,0 +1,15 @@ +#include "mupdf/fitz.h" + +/* TODO: implement JPEG-XR support */ + +fz_pixmap * +fz_load_jxr(fz_context *ctx, unsigned char *data, int size) +{ + fz_throw(ctx, FZ_ERROR_GENERIC, "JPEG-XR codec is not available"); +} + +void +fz_load_jxr_info(fz_context *ctx, unsigned char *data, int size, int *wp, int *hp, int *xresp, int *yresp, fz_colorspace **cspacep) +{ + fz_throw(ctx, FZ_ERROR_GENERIC, "JPEG-XR codec is not available"); +} |