Is there a way to directly transform an image?
This works but seems klunky :
Graphics[{Translate[ Raster@ImageData@image, {x,y}], .. other graphics objects .. }]
Just wondering if there is a better way..
Per JM.s comment, you can sort of do this with ImageForwardTransformation
I actually looked at those before asking the question and didn't think they would work, but now I went back and figured it out..
here is a simple translation:
{w, h} = ImageDimensions[img]
ImageForwardTransformation[ img , (# + {x, y}) &, Background -> 1,
DataRange -> Full, PlotRange -> {{0, w + x}, {0, h + y}}]
This creates a new larger image, large enough to contain the transformed result but still anchored with a corner at {0,0}, so isn't really equivalent to simply translating the image.
ImageTransformation[]
andImageForwardTransformation[]
. $\endgroup$ – J. M.'s ennui♦ May 30 '13 at 20:27