Crop Image to Circle

Something like this? Position of entire tikzpicture can be set using flushleft, flushright, and/or in suitable minipage.

enter image description here

% picture from https://www.lgbotanicals.com/Jasmine-Grandiflorum-Absolute_p_242.html
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{center}
\begin{tikzpicture}
\clip (0,0) circle (2cm) node {\includegraphics[width=4cm]{jasmine}};
\end{tikzpicture}
\end{center}    
\end{document}

Update: from daleif's suggestion. Suppose we want to show the flower buds on the left. Just manually control the coordinate in clip command. In this case, we move to the point (160:1.5) and showing the part of the picture inside the circle of radius 1.6cm. The red is just for showing the position of the origin, and should be removed.

enter image description here

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{center}
\begin{tikzpicture}
\clip (160:1.5) circle (1.6cm); 
\path (0,0) node{\includegraphics[width=6cm]{jasmine}};
\fill[red] (0,0) circle(2mm);
% picture from https://www.lgbotanicals.com/Jasmine-Grandiflorum-Absolute_p_242.html
\end{tikzpicture}
\end{center}    
\end{document} 

Put the node in a separate command, and change either the position of the clip or the one of the circle:

\documentclass{article}

\usepackage{tikz}
\usepackage{mwe}

\begin{document}

Clip and circle have the same center: \hfill
\begin{tikzpicture}
    \clip (0,0) circle (2cm);
    \node at (0,0) {\includegraphics[width=10cm]{example-image}};
\end{tikzpicture}
\smallskip

Here the node is shifted toward horizontal axis: \hfill
\begin{tikzpicture}
    \clip (0,0) circle (2cm);
    \node at (1,0) {\includegraphics[width=10cm]{example-image}};
\end{tikzpicture}
\medskip

And you can alternatively move the clip circle or the image node:\\
\begin{tikzpicture}
    \clip (0,0) circle (2cm);
    \node at (1,1) {\includegraphics[width=10cm]{example-image}};
\end{tikzpicture}
is equivalent to :
\begin{tikzpicture}
    \clip (-1,-1) circle (2cm);
    \node at (0,0) {\includegraphics[width=10cm]{example-image}};
\end{tikzpicture}

\end{document}

Example


You can do something like this:

\documentclass[border=3mm]{standalone}
\usepackage{tikz}
\begin{document}

\begin{tikzpicture}
\clip (0,0)  circle (2cm) ;
\node[anchor=center] at (2,1) {\includegraphics[width=10cm]{example-image}}; 
%adjust this coordinate to move image
\end{tikzpicture}

\end{document}

and then shift the image by adjusting the coordinate and anchor of the node. See sample outputs for different coordinates.

enter image description here enter image description here enter image description here

Tags:

Tikz Pgf