1. A non-transitory machine readable medium storing a program which when executed by at least one processing unit provides a graphical user interface (GUI) for editing an image, the GUI comprising: a display area for displaying an image comprising a plurality of pixels; a tool for (i) receiving a touch input that moves across a set of pixels of an image as a plurality of successive movements, (ii) identifying a first subset of the set of pixels over which the touch input initially moves, (iii) determining a set of similarity criteria for identifying pixels similar to the first subset of pixels, and (iv) applying an image processing operation only to a second subset of the set of pixels over which the touch input moves that satisfy the similarity criteria, wherein the image processing operation is not applied to pixels in the set of pixels over which the touch input moves that do not meet the similarity criteria.