beamer中暗背景插入图片

http://tex.stackexchange.com/questions/18685/techniques-for-embedding-images-with-transparent-backgrounds-in-latex

 

 

You need the standard package graphicx to include the image. Loaded xcolor would also be a good idea. Here some examples which use a transparent test PNG I got from http://entropymine.com/jason/testbed/pngtrans/rgba16.png .

 

写道
\documentclass{article}

\usepackage{xcolor}
\usepackage{graphicx}

\begin{document}

\framebox{\includegraphics{rgba16.png}}
\colorbox{red}{\includegraphics{rgba16.png}}
\colorbox{white}{\includegraphics{rgba16.png}}
\colorbox{yellow}{\includegraphics{rgba16.png}}

\end{document}

 

The first image shown is the original transparent PNG. As you can see the other work fine with some background color.

beamer中暗背景插入图片_第1张图片

For advanced effects like patterns and shadings I would recommend you PGF/TikZ (i.e. the tikz package).

 

写道
\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{patterns}

\begin{document}
\begin{tikzpicture}
\node [pattern=north east lines,inner sep=10pt] {\includegraphics{rgba16.png}};
\end{tikzpicture}
\begin{tikzpicture}
\node [shade,left color=yellow,right color=blue,inner sep=10pt] {\includegraphics{rgba16.png}};
\end{tikzpicture}
\end{document}

 

beamer中暗背景插入图片_第2张图片

你可能感兴趣的:(图片)