I have dynamic graphics over an image but they won't line up, what am I doing wrong?
img = ExampleData[ExampleData["TestImage"][[1]]];
d = ImageDimensions@img;
pt1=d/4;pt2={d[[1]]3/4,d[[2]]1/4};pt3=3d/4;pt4={d[[1]]1/4,d[[2]]3/4};
MultiContourPolygon[polys_List] := Module[{contours = Append[#, First[#]]&/@polys},
{Polygon@Join[Join@@contours,Reverse[First/@contours]],Line[contours]}
]
LocatorPane[
Dynamic[{pt1,pt2,pt3,pt4}],
Overlay[{Image[img,ImageSize->400]img,
Graphics[{Orange, Opacity[.4],
Dynamic @ MultiContourPolygon[{{pt1,pt2,pt3,pt4}, {{0,0}, {d[[1]],0},d,{0,d[[2]]}}}]},
ImagePadding -> 0, ImageMargins ->0> 0, ImageSize ->400> d
]
}, Alignment -> {Left, LeftBottom}, ImageSize -> 400d
]
]