Thank you for your answer! That looks difficult indeed, but I'll study this method and see if I have enough skills. Actually I had some thoughts that apparently went to the right direction, but I couldn't build up any formula to do this. I've been programming pics in assembly for a year now, and I have learned a lot.