Hi, The code snippet you have posted doesn't include the part where you initialize the pixel regions. It would help if you could post a complete test case that we can compile and run. Sven