summaryrefslogtreecommitdiffstats
path: root/Modules/imageop.c
diff options
context:
space:
mode:
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;
}