summaryrefslogtreecommitdiffstats
path: root/Modules/imageop.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-04-09 19:24:53 (GMT)
committerGuido van Rossum <guido@python.org>1997-04-09 19:24:53 (GMT)
commit644a12b00ce6a361089b488aa8096a6c86b52275 (patch)
tree73e3cfeeba809a3fc43f42d1883ebe9dffe3ffda /Modules/imageop.c
parent801776742082034cc6193530326af042d5af56a5 (diff)
downloadcpython-644a12b00ce6a361089b488aa8096a6c86b52275.zip
cpython-644a12b00ce6a361089b488aa8096a6c86b52275.tar.gz
cpython-644a12b00ce6a361089b488aa8096a6c86b52275.tar.bz2
Tweaks to keep the Microsoft compiler quier.
Diffstat (limited to 'Modules/imageop.c')
-rw-r--r--Modules/imageop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/imageop.c b/Modules/imageop.c
index 0f8e0ed..007c83e 100644
--- a/Modules/imageop.c
+++ b/Modules/imageop.c
@@ -572,7 +572,7 @@ PyObject *args;
b = (int) (((value >> 16) & 0xff) / 255. * 3. + .5);
#endif
nvalue = (r<<5) | (b<<3) | g;
- *ncp++ = nvalue;
+ *ncp++ = (unsigned char)nvalue;
}
return rv;
}
@@ -653,7 +653,7 @@ PyObject *args;
b = (value >> 16) & 0xff;
nvalue = (int)(0.30*r + 0.59*g + 0.11*b);
if ( nvalue > 255 ) nvalue = 255;
- *ncp++ = nvalue;
+ *ncp++ = (unsigned char)nvalue;
}
return rv;
}