Is it possible to use a PNG image as a background, but with selected opacity? It seems to me that standard solutions found here can not change opacity of PNG...

I assume, that in the following one of the flags should be near transparent (taken from Includegraphics: set image opacity):







but the result is:

enter image description here

where it.png is

enter image description here

  • Yes it is possible. Here is an example of using a background image with opacity: Background images for code listings. We'd really have to see a MWE to figure out why what you tried did not work for you. May 18, 2013 at 5:03
  • @PeterGrill It is rather MNWE (minimal non working example). May 18, 2013 at 5:46
  • That depends on whether Peter means the document is working, or that the error is working...:) May 18, 2013 at 8:03

2 Answers 2


You just have to run pdflatex twice for the transparency to kick in for your original tex source. The package actually prints out a message to say that when you run it the first time.


As a fan of both tikz and background, here's a version showing four different opacities:




            \node[opacity=\myopacity] {\includegraphics[scale=1]{avatar.png}};





enter image description here

  • I have obtained: "! LaTeX Error: Unknown option angle=0' for package background'." and so on. :-( May 18, 2013 at 17:33
  • @PrzemysławScherwentke: Which version do you use? I used the v2.0 natation, which is not compatible with v1.0. There you used \SetBgContents{} \SetBgColor{} \SetBgAngle{} \SetBgOpacity{} \SetBgScale{} \SetBgPosition{} \SetBgAnchor{} \SetBgHshift{} \SetBgVshift{}. Either change to the old syntax or upgrade to v2.0 (if that is the problem). May 18, 2013 at 19:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .