pattern selector on an image