Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is there a way of making the white areas in a picture transparent, so that when placed on a background, the background colour appears on the picture where there was previously white?

In fact I’m trying to insert a logo on a blue background. I just want the logo to appear on top of the background, but when I insert it on the background, a white rectangular box appears around the logo, because the white parts in picture file containing the logo aren’t transparent. Can anyone help?

enter image description here

share|improve this question

closed as off topic by Thorsten, Marco Daniel, Joseph Wright Aug 23 '12 at 6:10

Questions on TeX - LaTeX Stack Exchange are expected to relate to TeX, LaTeX or related typesetting systems within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

3  
This is no question releated to TeX I think. It's a problem of your used image. Ask your institution for an logo with an transparent background and (if allowed, it depends on the CI of the institution) the foreground in white. –  Kurt Aug 22 '12 at 16:59
    
So you want to remove the white background and not add a background like you title suggests? –  Martin Scharrer Aug 22 '12 at 17:02
add comment

1 Answer 1

up vote 4 down vote accepted

I see your image is in JPG format. AFAIK, JPG does not support transparency. So what I did was (1) opened the image in gimp; (2) added alpha-channel (this is transparency in image-speak); (3) saved it as a PNG image (dmcmn.png).

Then I compiled a simple file:

\documentclass{article}
\thispagestyle{empty}
\usepackage{xcolor,graphicx}
\begin{document}
\pagecolor{blue!20}
\includegraphics{dmcmn}
\end{document}

Here is the result:

enter image description here

share|improve this answer
    
Great! Thanks a lot for your help, that's exactly what I was looking for. –  Percy Aug 22 '12 at 21:42
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.