From a0ba4894f147b54c7f81d2768a625f24131f3346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=C3=BCnzli?= Date: Fri, 16 Aug 2013 23:34:07 +0200 Subject: add FZ_IMAGE_JXR placeholder for downstream implementors --- source/fitz/image.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/fitz') diff --git a/source/fitz/image.c b/source/fitz/image.c index 899232e0..02610eef 100644 --- a/source/fitz/image.c +++ b/source/fitz/image.c @@ -293,6 +293,9 @@ fz_image_get_pixmap(fz_context *ctx, fz_image *image, int w, int h) case FZ_IMAGE_TIFF: 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"); + break; default: native_l2factor = l2factor; stm = fz_open_image_decomp_stream(ctx, image->buffer, &native_l2factor); @@ -484,7 +487,10 @@ fz_new_image_from_buffer(fz_context *ctx, fz_buffer *buffer) fz_load_png_info(ctx, buf, len, &w, &h, &xres, &yres, &cspace); } 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"); + } else if (memcmp(buf, "MM", 2) == 0 || memcmp(buf, "II", 2) == 0) { bc->params.type = FZ_IMAGE_TIFF; -- cgit v1.2.3