Brusque -- > Saddly, your solution suffers from a problem I haven't seen when I wrote > the original post. > > The filter don't go from 1 to 0: Yes, that's rounding for you -- it either biases toward 0 (truncation) or toward +infinity (adding 0.5 and truncating). If you really need to go all the way from 0 to 255, then you need something more sophisticated. "Round to even", as used in some floating-point systems, won't work for you; you'll still get stuck at 254 at the high end. One approach would be to "dither" the rounding by simply adding 1 or adding 0 on alternate iterations. -- Dave Tweed -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body