# Drawing Circle using Image[Graphics[]] - incorrect coordinates

I want to draw a circle with center {x,y} in an image. I use the following code:

img = Image[Graphics[{
{Red, Thick, Circle[{100, 200}, 20]},
{Opacity[0, Black],Rectangle[{0, 0}, {500, 500}]}
},
ImageSize -> {500, 500}],ColorSpace -> "RGB"]

What I don't understand is that if I print the Image to the screen the position of the circle is not as expected. As you can see {100,200} is not the center of the circle.

How could I print a circle with the right coordinates?

• Can you clarify what is that you want to plot? You have 2 circles in your image, but only one in the function. also, What do you mean by plot to screen? My WM plots in the correct coordinates with reference to the Rectangle[] – Jose Enrique Calderon Feb 6 '19 at 15:00
• Interesting, it seems to be because of the Image[] command, I get the same result. If I instead put it as an epilog in a plot, it is correct. Try e.g. Plot[2x,{x,0,600},ImageSize->1000,GridLines->{{100},{200}},Epilog->{{Red, Thick, Circle[{100, 200}, 20]}, {Opacity[0.1, Black],Rectangle[{0, 0}, {500, 500}]}}] – a20 Feb 6 '19 at 15:10
• @JoseECalderon the extra red circle comes from the coordinates tool, it is just a marker where you clicked with the mouse in order to save the coordinates. The issue is that the coordinates tool does not give the expected coordinates from how the image was defined. – a20 Feb 6 '19 at 15:11
• @JoseECalderon As bjorn mentioned the small circle origniates from the Coordinates Tool. I just wanted to show that the coordinates of the center are not {100,200} – RMMA Feb 6 '19 at 15:20
• @bjorn Thx for your effort. For me it would be important that the center is at the right pixel. I want to overlay the circle with another image which includes some points I want to mark automatically – RMMA Feb 6 '19 at 15:21