Figure inset in right bottom corner - non transparent

I have 2 pdf images: 1.pdf and 2.pdf. Now I would like to have 2.pdf as an inset (in the right bottom corner) in the Figure 1.pdf.

My question is almost similar to this ; however I only want 1 image with 1 inset figure.

Furthermore, when I tried to alter some of the TeX code, I obtained a transparent figure inset of 2.pdf in the image 1.pdf, and I don't want this.

It would even be fine if there would be a white box around the inset of 2.pdf.

There are two issues, it would appear from the OP's comments: 1) insetting an image, and 2) eliminating/masking the transparancy of the inset. I will address the issues in turn:

IMAGE INSET

Here I give two examples using \stackinset. The first flush to the bottom right corner, and the second with some border. I use \includegraphics for the images, but tikz code or similar things can go in their place.

\documentclass{article}
\usepackage{stackengine,graphicx}
\begin{document}
\noindent\stackinset{r}{}{b}{}{\includegraphics[width=2in]{example-image-A}}
{\includegraphics[width=\textwidth]{example-image-B}}\medskip

\noindent\stackinset{r}{15pt}{b}{25pt}{\includegraphics[width=2in]{example-image-A}}
{\includegraphics[width=\textwidth]{example-image-B}}
\end{document}


Here's a version with a white border:

\documentclass{article}
\usepackage{stackengine,graphicx,xcolor}
\begin{document}
\fboxrule=5pt\relax
\fboxsep=0pt\relax
\noindent\stackinset{r}{}{b}{}
{\color{white}\fbox{\includegraphics[width=2in]{example-image-A}}}
{\includegraphics[width=\textwidth]{example-image-B}}\medskip
\end{document}


To deal with a transparent inset image-A, place it on a white \colorbox:

\documentclass{article}
\usepackage{stackengine,graphicx,xcolor}
\begin{document}
\fboxrule=5pt\relax
\fboxsep=0pt\relax
\noindent\stackinset{r}{}{b}{}
{\colorbox{white}{\includegraphics[width=2in]{example-image-A}}}
{\includegraphics[width=\textwidth]{example-image-B}}\medskip
\end{document}

• Thanks a lot, but I still have the transparency issue. Image A is transparent in my case and thus I cannot see it very well using this method. Is there anything I can do about it? – student441 Aug 13 '15 at 13:22
• @student441 See my follow-up – Steven B. Segletes Aug 13 '15 at 13:25