[Tex/LaTex] Semi-transparent background for image

beamertikz-pgftransparency

I would like to add a semi-transparent background to an eps figure in beamer. The picture itself has transparent background. I want to add the semi-transparant background as I use the tikz package to overlap it with a first figure whose overlaped parts should still be visible. Here is the code I have so far:

\begin{frame}{}
    \begin{itemize}
        \item item
        \begin{tikzpicture}
            \node (img1) {\includegraphics[height=0.4\textwidth]{figure1}};
            \visible<2>{\node (img2) at (img1.south east){\includegraphics[height=0.4\textwidth]{figure2}};}
        \end{tikzpicture}
    \end{itemize}
\end{frame}

Best Answer

I am not sure of having understood your question correctly. Hence this is shooting blindfolded. Do you mean some thing like this?

You can use opacity=<value>. The MWE is :

\documentclass{beamer}
\usepackage{tikz}
\begin{document} 
\begin{frame}{}
    \begin{itemize}
        \item item
        \begin{tikzpicture}
            \node (img1) {\includegraphics[height=0.4\textwidth]{example-image-a}};
            \visible<2>{\node[opacity=0.7] (img2) at (img1.south east){\includegraphics[height=0.4\textwidth]{example-image-b}};}
        \end{tikzpicture}
    \end{itemize}
\end{frame}
\end{document}

enter image description here

For me both the images A and B do not have transparent background. Since your image is already having a transparent backgound, I have no idea of how it will be. Please feed back.

Edit:

Following the comments, this is the next guess in trying to accomplish the goal.

\documentclass{beamer}
\usepackage{tikz}
\begin{document}
\begin{frame}{}
    \begin{itemize}
        \item item
        \begin{tikzpicture}
            \node (img1) {\includegraphics[height=0.4\textwidth]{example-image-a}};
            \visible<2>{\node[opacity=0.9,fill=red!90] (img2) at (img1.south east) {\phantom{\includegraphics[height=0.4\textwidth]{tansparent}}};
            \node (img2) at (img1.south east) {\includegraphics[height=0.4\textwidth]{tansparent}};}
        \end{tikzpicture}
    \end{itemize}
\end{frame}
\end{document}

Here an articial bounding box is used with the help of \phantom.

enter image description here