summaryrefslogtreecommitdiff
path: root/xps/xpsjpeg.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-01-04 17:18:19 +0000
committerRobin Watts <robin.watts@artifex.com>2016-01-04 18:59:07 +0000
commit7069210f88b764929a32713ab5032f02097b62b5 (patch)
treee337a2815d746f1f8b1b6a3827b1918ff3637980 /xps/xpsjpeg.c
parentd697081ba9f0943977ed5ae8a62c7389046a5776 (diff)
downloadghostpdl-7069210f88b764929a32713ab5032f02097b62b5.tar.gz
Squash warnings: XPS MSVC
Add some casts etc to squash (most of) the warnings seen in an MSVC debug build of ghostxps. We have an unavoidable "cast away of const" in a devspecop call, and various stupidities in the jpegxr lib left over.
Diffstat (limited to 'xps/xpsjpeg.c')
-rw-r--r--xps/xpsjpeg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xps/xpsjpeg.c b/xps/xpsjpeg.c
index 29fc375c1..d419ed121 100644
--- a/xps/xpsjpeg.c
+++ b/xps/xpsjpeg.c
@@ -117,8 +117,8 @@ xps_decode_jpeg(xps_context_t *ctx, byte *rbuf, int rlen, xps_image_t *image)
}
else if (jddp.dinfo.density_unit == 2)
{
- image->xres = jddp.dinfo.X_density * 2.54;
- image->yres = jddp.dinfo.Y_density * 2.54;
+ image->xres = (int)(jddp.dinfo.X_density * 2.54 + 0.5);
+ image->yres = (int)(jddp.dinfo.Y_density * 2.54 + 0.5);
}
else
{