From 2bfdfa038a133a5a832ace5fdeef5f372142606b Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 19 Sep 2014 17:56:34 +0100 Subject: Ensure that TIFFs with resolution set to zero get sane values. This is required for XPS, as otherwise images can be completely omitted. --- source/fitz/load-tiff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source') diff --git a/source/fitz/load-tiff.c b/source/fitz/load-tiff.c index 52df3de3..94bf2dc1 100644 --- a/source/fitz/load-tiff.c +++ b/source/fitz/load-tiff.c @@ -904,8 +904,8 @@ fz_load_tiff_info_subimage(fz_context *ctx, unsigned char *buf, int len, int *wp *wp = tiff.imagewidth; *hp = tiff.imagelength; - *xresp = tiff.xresolution; - *yresp = tiff.yresolution; + *xresp = (tiff.xresolution ? tiff.xresolution : 96); + *yresp = (tiff.yresolution ? tiff.yresolution : 96); *cspacep = tiff.colorspace; } fz_always(ctx) -- cgit v1.2.3