[Tex/LaTex] Using Pstricks to draw white boxes with white boarders fails

pstricks

I want to overlay one graphic over the another in my latex, however the white background is annoyingly transparent. To over come this I want to draw a rectangle of white behind the overlayed figure. like this:

\begin{figure}
\begin{overpic}[scale=0.48]%
{Plots/A_Mesh_a_d:0.056.eps}
\put(50,10){\psframe[framearc=0.3,% The box !!!!!
                 fillstyle=solid,
                 fillcolor=white,
                 linestyle=solid,
                 linecolor=white,](0,0)(0.27\textwidth,2.6)}
\put(50,10){
\includegraphics%
[width=0.25\textwidth]%
{Plots/A_Alligned_l.eps}}
\end{overpic}}
\end{figure}

But I get the error:

!!! Warning: Empty Bounding Box is returned by Ghostscript!
!!!   Page 8: 0 0 0 0
!!! Either there is a problem with the page or with Ghostscript.
!!! Recovery is tried by embedding the page in its original size.

I guess an all white box dosn't have its bounding box detected? Any Ideas why? Am I doing something stupid?

Thanks

p.s. another minor annoance with the above is that i cant use

\begin{overpic}[width=0.45\textwidth]%

withough screwing up the scaling of the overlayed graphic

\includegraphics[width=0.25\textwidth]%

so i have to use scale instead and guess a good value.

Best Answer

It makes no sense to mix LaTeX and PSTricks commands. However, I cannot test your example in fact of missing images. This works with a red box to make it visible:

\documentclass{article}
\usepackage{pricks}
\usepackage{overpic}

\begin{document}

\begin{overpic}[scale=0.48]{tiger}
\put(50,10){\psframe*[framearc=0.3,% The box !!!!!
                 linecolor=red](0,0)(0.27\textwidth,2.6)}
\put(50,10){\includegraphics[width=0.25\textwidth]{tiger}}
\end{overpic}
\end{document}

enter image description here