diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/fitz/load-png.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/fitz/load-png.c b/source/fitz/load-png.c index 984dbed2..d897b5be 100644 --- a/source/fitz/load-png.c +++ b/source/fitz/load-png.c @@ -360,8 +360,8 @@ png_read_phys(struct info *info, unsigned char *p, unsigned int size) fz_throw(info->ctx, FZ_ERROR_GENERIC, "pHYs chunk is the wrong size"); if (p[8] == 1) { - info->xres = getuint(p) * 254 / 10000; - info->yres = getuint(p + 4) * 254 / 10000; + info->xres = (getuint(p) * 254 + 5000) / 10000; + info->yres = (getuint(p + 4) * 254 + 5000) / 10000; } } |