I want to clip a image with relative coordinate.
see below example:
\documentclass{standalone}
\usepackage{tikz}
\tikzset{mynode/.style={draw,solid,circle,inner sep=1pt}}
\usepackage{etoolbox}
\newbool{DEBUG}
\booltrue{DEBUG}
%\boolfalse{DEBUG}
\begin{document}
\def\infilename{tiger.pdf}
\begin{tikzpicture}[>=latex]
\node[anchor=south west,inner sep=0] (image) at (0,0,0) {\includegraphics[width=5cm]{\infilename}};
\begin{scope}[x={(image.south east)},y={(image.north west)}]
\clip (0.4,0.6) rectangle (0.5,0.7);
\ifbool{DEBUG}{\small
\draw[help lines,xstep=.1,ystep=.1] (0,0) grid (1.001,1.001);
\foreach \x in {1,...,9} { \node [anchor=north] at (\x/10,0) {\x};}
\foreach \y in {1,...,9} { \node [anchor=east] at (0,\y/10) {\y};}
};
\end{scope}
\end{tikzpicture}
\end{document}
But it seems only clip the help lines but not on origin picture. I like relative coordinate because it's more easy to locate the exact position which I want.
Is it possible to fix it? In this example, I only want to extract the rectangle area (0.4,0.6) to (0.5,0.7). say full image is (0,0) to (1,1).





