summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorSimon Bünzli <zeniko@gmail.com>2013-08-16 23:34:07 +0200
committerRobin Watts <robin.watts@artifex.com>2013-08-28 13:35:56 +0100
commita0ba4894f147b54c7f81d2768a625f24131f3346 (patch)
treea5275409936c5f88c340a8f84d7e03cf31ac1867 /source
parent5127d6fe0fb46f4baf0b67dc8c966cc8cc676475 (diff)
downloadmupdf-a0ba4894f147b54c7f81d2768a625f24131f3346.tar.xz
add FZ_IMAGE_JXR placeholder for downstream implementors
Diffstat (limited to 'source')
-rw-r--r--source/fitz/image.c6
1 files changed, 6 insertions, 0 deletions
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;