I should have read the code before posting my last message: Dr William Bland (wjb@xxxxxxxxxxxxxxxxxxxx) wrote: > I thought about using some kind of "double tile iterator" to do this, e.g: > > gimp_pixel_rgn_init (&image_rgn, image_drawable, > x1, y1, (x2 - x1), (y2 - y1), TRUE, TRUE); > gimp_pixel_rgn_init (&select_rgn, select_drawable, > x1, y1, (x2 - x1), (y2 - y1), TRUE, TRUE); > for (p1 = gimp_pixel_rgns_register (1, &image_rgn), > p2 = gimp_pixel_rgns_register (1, &select_rgn); > (p1 != NULL) && (p2 != NULL); > p1 = gimp_pixel_rgns_process (p1), > p2 = gimp_pixel_rgns_process (p2)) this better should be p1 = gimp_pixel_rgns_register (2, &image_rgn, &select_rgn); p1 != NULL; p1 = gimp_pixel_rgns_process (p1) > { > /* Interesting stuff goes in here! */ > /* Set some of the pixels in select_drawable */ > /* depending on the pixels in image_drawable. */ > } Then the core will care about the stuff I mentioned in the other mail. Bye, Simon -- Simon.Budig@xxxxxxxxxxx http://www.home.unix-ag.org/simon/