Examples |
PDF manual "bmeps.pdf" available german PDF manual "bmepsde.pdf" available |
![]() |
bmeps |
|
| Converter from PNG/JPEG/NetPBM to EPS and PDF |
| Overview / Installation / Usage / / FAQ / Change Log / Other Projects |
Examples |
PDF manual "bmeps.pdf" available german PDF manual "bmepsde.pdf" available |
In the examples we use a partially transparent PNG file fbt.png containing a clock showing 5 minutes before 12. The image contains a radial alpha gradient, it is fully opaque in the center and fully transparent in the corners. The table below shows the image in front of different background colors.
![]() |
![]() |
![]() |
The LaTeX source for the examples is a one-foil beamer presentation:
\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}{magenta!50}
\begin{frame}
\frametitle{Image over white background}
\includegraphics[width=5cm]{fbt1}
\end{frame}
\end{document}
While processing the examples we will change the background to yellow
and later into a blue-to-yellow transition, the file name of the
included graphics also changes.
The commands
bmeps -leps1 fbt.png fbt1.eps latex bt1 && latex bt1 && latex bt1produce EPS level 1 output.
The commands
bmeps -l eps2 fbt.png fbt2.eps latex bt2 && latex bt2 && latex bt2produce EPS level 2 output. The output is colored now, but the file size is much smaller than fbt1.eps because PS level 2 provides better compression and encoding algorithms.
If we change the presentations background color to yellow and run
latex bt3 && latex bt3 && latex bt3the image of the background is unchanged white because the colors in the EPS file did not change.
The yellow color is expressed hexadecimally as 0xff, 0xff and 0x7f.
The conversion to the range [0;1] results in 1, 1, 0.5.
To create fbt3.eps we mix against a background color (m=y), the
default background color is 1:1:0.5 (b=1.0:1.0:0.5) and the
default background color is always used (a.u.d.b=y) ignoring background
color information from the input file.
bmeps -leps2,m=y,b=1.0:1.0:0.5,a.u.d.b=y fbt.png fbt3.eps latex bt4 && latex bt4 && latex bt4
Now we use a blue-to-yellow transition as background in the presentation. In addition to mixing the alpha channel from the input file is converted into an image mask.
bmeps -leps3,m=y,b=1.0:1.0:0.5,a.u.d.b=y,c.i.m=y fbt.png fbt4.eps latex bt5 && latex bt5 && latex bt5
To make the image partially transparent (the presentation background
is partially visible through the image) we need to transfer the alpha
channel to the output. This is possible for PDF level 1.4 output
only.
First we attempt to include the fbt.png image directly
\includegraphics[width=5cm]{fbt}
and run
pdflatex bt6 && pdflatex bt6 && pdflatex bt6The result

\includegraphics[width=5cm]{fbt5.pdf}
bmeps -lpdf fbt.png fbt5.pdf pdflatex bt6 && pdflatex bt6 && pdflatex bt6