Drawing on an image

To make it easier to find the desired points in the new coordinate system, you can draw a labeled grid on top of the image while you’re working on it:

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
    \node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=0.9\textwidth]{some_image.jpg}};
    \begin{scope}[x={(image.south east)},y={(image.north west)}]
        \draw[red,ultra thick,rounded corners] (0.62,0.65) rectangle (0.78,0.75);
    \end{scope}
\end{tikzpicture}
\end{document}

Image source: Wikipedia

One Reply to “Drawing on an image”

Leave a Reply

Your email address will not be published.