# How to clip an external image inside an ellipse

I am trying to create a fancy image by clipping an external image by an ellipse- the area inside the ellipse will be shown only. I have seen this, but I still need help. Can anybody help?

Here's an instance of what I am saying:

-
Section 15.5 of the pgfmanual is about this topic and gives an explicit example on how to do that. Does this help? – Bordaigorl Jan 19 '14 at 16:34
Here's a precise link: mirror.ox.ac.uk/sites/ctan.org/graphics/pgf/base/doc/generic/… – Bordaigorl Jan 19 '14 at 16:40

With PSTricks just for fun.

\documentclass[pstricks,border=12pt]{standalone}
\usepackage{graphicx}
\newsavebox\IBox
\savebox\IBox{\includegraphics[scale=1]{example-grid-100x100pt}}
\psset
{
xunit=.1\wd\IBox,
yunit=.1\ht\IBox,
}
\begin{document}
\begin{pspicture}(10,10)
\psclip{\psellipse(5,5)(5,4)}
\rput(5,5){\usebox\IBox}
\endpsclip
\end{pspicture}
\end{document}


## Bonus

An elliptical batman clipping path.

\documentclass[pstricks,border=0pt]{standalone}
\SpecialCoor
\usepackage{graphicx}
\newsavebox\IBox
\savebox\IBox{\includegraphics[scale=1]{example-grid-100x100pt}}
\psset
{
xunit=\dimexpr\wd\IBox/14,
yunit=\dimexpr\ht\IBox/14,
}

% b a t p2c ---> x y
% where b (semi-minor), a (semi-major), t (theta)
\pstVerb{/p2c {dup 3 1 roll cos mul 3 1 roll sin mul} bind def}

\def\RightPart
{
\psline(0.5,2.7)(1,3.25)
\psbezier(1.2,1.3)(1.3,1.0)(2.0,1.0)
\psbezier(3.0,1.0)(3.0,2.2)(!3.3 6.0 72 p2c)
\psellipticarcn(6.0,3.3){(!3.3 6.0 72 p2c)}{(!3.3 6.0 72 neg p2c)}
\psbezier(4,-2)(4,0)(2.2,-1.8)
\psbezier(1.5,-1)(1,-1)(0,-3.2)
}

\begin{document}

\begin{pspicture}(-7,-4)(7,4)
\psclip{
\pscustom[dimen=monkey]
{
\RightPart
\reversepath
\scale{-1 1}
\RightPart
\closepath
}}
\rput(0,0){\usebox\IBox}
\endpsclip
\end{pspicture}
\end{document}


-
How did you manage with the Batman logo thingy? Looks amazing... – azetina Jan 19 '14 at 18:11
@azetina: By trial and error approach to find the best coordinates. – kiss my armpit Jan 19 '14 at 18:12
@Pleasedon'ttouch Your user profile looks nice! :D – pushpen.paul Jul 19 '14 at 15:18
@pushpen.paul: Thanks for liking it. :-) – kiss my armpit Jul 19 '14 at 15:29

With TikZ

# Code

\documentclass[border=2pt]{standalone}
\usepackage{tikz}
\usepackage{mwe} % provides example-image-a
\begin{document}
\begin{tikzpicture}