summaryrefslogtreecommitdiff
path: root/source/fitz
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2014-09-19 17:56:34 +0100
committerTor Andersson <tor.andersson@artifex.com>2014-09-22 12:03:53 +0200
commit2bfdfa038a133a5a832ace5fdeef5f372142606b (patch)
tree171fb39afefd9da5c438fb597fb545a97c4cf613 /source/fitz
parentb0fa33ec5d73e3c380bc90bf656c22ed64b8950b (diff)
downloadmupdf-2bfdfa038a133a5a832ace5fdeef5f372142606b.tar.xz
Ensure that TIFFs with resolution set to zero get sane values.
This is required for XPS, as otherwise images can be completely omitted.
Diffstat (limited to 'source/fitz')
-rw-r--r--source/fitz/load-tiff.c4
1 files changed, 2 insertions, 2 deletions
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)