From 9d00686f53296e7aafa9bd66789e7dce7367cc96 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Fri, 22 Aug 2014 16:14:48 -0700 Subject: [PATCH] backup implementation of Round for windows platforms --- libImaging/Convert.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libImaging/Convert.c b/libImaging/Convert.c index 46a6cfb72..3d9119c7f 100644 --- a/libImaging/Convert.c +++ b/libImaging/Convert.c @@ -49,6 +49,12 @@ #define L(rgb)\ ((INT32) (rgb)[0]*299 + (INT32) (rgb)[1]*587 + (INT32) (rgb)[2]*114) +#ifndef round +double round(double x) { + return floor(x+0.5); +} +#endif + /* ------------------- */ /* 1 (bit) conversions */ /* ------------------- */