summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2015-01-06 18:19:40 +0000
committerRobin Watts <robin.watts@artifex.com>2015-02-10 20:29:18 +0000
commit65ada9d7fc252f3dad9b2d3a4a9e571d16358cbd (patch)
treefbed4d01a134291110ed6095f08d5500370fb4c0 /include
parentda04ae926d5ba78fd87f4d5da4c1c889b511c74b (diff)
downloadmupdf-65ada9d7fc252f3dad9b2d3a4a9e571d16358cbd.tar.xz
Attempting to render a JPEG with xres and yres set to 1 fails.
We end up trying to scale the JPEG up 72 times and fail a malloc. A better plan is to make the image handler disbelieve any xres or yres values less than 72dpi. We take care to still preserve aspect ratios etc.
Diffstat (limited to 'include')
-rw-r--r--include/mupdf/fitz/image.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/mupdf/fitz/image.h b/include/mupdf/fitz/image.h
index 42b45508..22d87988 100644
--- a/include/mupdf/fitz/image.h
+++ b/include/mupdf/fitz/image.h
@@ -93,4 +93,6 @@ void fz_load_jxr_info(fz_context *ctx, unsigned char *data, int size, int *w, in
int fz_load_tiff_subimage_count(fz_context *ctx, unsigned char *buf, int len);
fz_pixmap *fz_load_tiff_subimage(fz_context *ctx, unsigned char *buf, int len, int subimage);
+void fz_image_get_sanitised_res(fz_image *image, int *xres, int *yres);
+
#endif