# Positioning images in Graphics using Inset

I need to position a certain part of a photographic image at the origin of a plot in Graphics. I am currently using Inset[image, {0,0}, {xpos,ypos}, size] and varying xpos and ypos until it looks right. This is time consuming considering the number of images I am adding. Is there a way to select the desired point on each image and then obtain its coordinates within that image so that I can determine xpos and ypos exactly. Any advice would be welcome.

• Maybe setting Axis->True so that you can determin the position on one glimps. – Wjx Sep 13 '16 at 4:44
• You might want to use Raster. Unlike Inset, it uses standard graphics coordinates and makes it possible to align an image with other graphics elements with perfect precision. – Szabolcs Sep 13 '16 at 9:58

I'm not 100% sure what you're looking for, but it can probably done using LocatorPane and Dynamic, e.g. like this:

img = ExampleData[{"TestImage", "CarAndAPC"}];

pt = {0, 0};
Row[{
LocatorPane[Dynamic[pt], img],
Dynamic[Plot[Sinc[x], {x, -10, 10},
Prolog -> {Inset[img, {0, 0}, pt]}, ImageSize -> 300]],
Dynamic[pt]}]


• That is what I need, nikie. I will also try Szabolcs' suggestion to use Raster for greater precision with the alignment. This was very helpful. – JCF Sep 13 '16 at 19:33