Berwyn Hoyt wrote: > I don't know whether this solution is 'efficient' by your > definition, but it uses standard libraries. It needs to be fast. Any solution that involves a Python loop over the pixels is totally off the radar, sorry. -- Greg