"Paul McGuire" <[EMAIL PROTECTED]> wrote:

| Even downer-and-dirtier, you could approximate 30 with 32, 59 with 64, and
| 11 with 8, and do bit-shifting instead of multiplying:
|
| def darkness(img,x,y):
|     return  (RedVal(img,x,y) << 5) + (GreenVal(img,x,y) << 6) +
| (BlueVal(img,x,y) << 3)
|
|
| -- Paul

*grin* - a man after my own heart! - how do you multiply by ten? - shift, save a
copy, shift twice more and add the copy...

- Hendrik

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to