Extend "Sample Color from Image" to support wrapping

From the Image Pixel feature request:

Wrap image edge — When I sample an area with a radius of 2 in the top left corner, do I want to limit my sample to a 3x3 grid in the top left, or do I want to grab the 2 pixels from the other edges? See attached mockup.