\paragraph{Test image}
For demonstation purposes we use a self-made file fbt.png containing
a clock showing five before twelve.\\
The alpha channel contains a radial alpha gradient. Figure~\vref{fig:fbt-screen}
shows the image in front of different backgrounds.
\pngimagelw{fbt-screen}{Example PNG file, different background colors.}
\clearpage
\paragraph{\LaTeX{} document} We use a beamer presentation containing
just one foil.
\begin{lstlisting}
\documentclass{beamer}
\mode<presentation>{\usetheme{Madrid}
\setbeamercovered{transparent}}
\usepackage[german]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{ifpdf}
\usepackage{graphicx}
\usepackage{color}
\ifpdf\hypersetup{pdfpagemode=FullScreen}\fi
\title[Beamer and bmeps]{Using bmeps with the beamer class}
\author[Krause]{D.~Krause}
\subject{bmeps}
\begin{document}
% \beamertemplateshadingbackground{yellow!50}{blue!50}
\begin{frame}
\frametitle{Image over colored background}
\includegraphics[width=5cm]{fbt1}
\end{frame}
\end{document}
\end{lstlisting}
In the beginning we use a white background, later we use yellow background
and a blue-to-yellow transition.
\clearpage
\paragraph{PS-level 1} The image is converted to \textsc{eps} using
\begin{lstlisting}
bmeps -leps1 fbt.png fbt1.eps
\end{lstlisting}
the presentation is build by
\begin{lstlisting}
latex bt1 && latex bt1 && dvips bt1
\end{lstlisting}
This produces a result as in figure~\vref{fig:sc1}.
\pngimagelw{sc1}{Example 1}
\clearpage
\paragraph{PS-level 2} The conversion command
\begin{lstlisting}
bmeps -leps2 fbt.png fbt2.eps
\end{lstlisting}
produces output as in figure~\vref{fig:sc2} (fbt2.eps is included in the
presentation now).
\pngimagelw{sc2}{Example 2}
\clearpage
\paragraph{Colored background} If we use a colored background in the
presentation the clock still has a white background because the white
color is contained in the \textsc{eps} file, see figure~\vref{fig:sc3}.
\pngimagelw{sc3}{Example 3}
\clearpage
\paragraph{Better background} The yellow backgound in the presentation
uses RGB 0xFF, 0xFF 0x7F. This results in 1, 1, 0.5 when converted into
the range \([0;1]\). So we use the image conversion command
\begin{lstlisting}
bmeps -leps2,m=y,b=1.0:1.0:0.5,a.u.d.b=y fbt.png fbt3.eps
\end{lstlisting}
The command mixes against a background color (m=y), the default background
color is 1.0:1.0:0.5 and the default background color is always used
for mixing (a.u.d.b=y) no matter whether or not the input contains
a background chunk. Output can be seen in figure~\vref{fig:sc4}.
\pngimagelw{sc4}{Example 4}
\clearpage
\paragraph{Image mask (PS-level 3)}
The presentation in figure~\vref{fig:sc5} uses a blue-to-yellow
transition in the background. The clock image uses an image mask.
Only pixels for which \(opacity>triggerlevel\) are drawn.
The command to create fbt4.eps is:
\begin{lstlisting}
bmeps -leps3,m=y,b=1.0:1.0:0.5,a.u.d.b=y,c.i.m=y fbt.png fbt4.eps
\end{lstlisting}
\pngimagelw{sc5}{Example 5}
\clearpage
\paragraph{Alpha channel transfer (\textsc{pdf})}
If we want partial transparency we need to transfer alpha channel data
from input to output. This is only possible when creating \textsc{pdf}
output. Figure~\vref{fig:sc6} was produced by the commands
\begin{lstlisting}
bmeps -lpdf fbt.png fbt5.pdf
pdflatex bt6 && pdflatex bt6 && pdflatex bt6
\end{lstlisting}
\pngimagelw{sc6}{Example 6}
\clearpage
