Converting transparent PNGs for use with LaTeX
• alpha, latex, Mixed, png, transparency
I have recently discovered the power and ease of use of LaTeX and in my last report in included quite a few screenshots of the application I was writing. However OS X’s screenshot tool also saves the nice drop shadow that the UI produces around it’s windows.
LaTeX on the other hand, doesn’t seem to like those drop shadows as they contain transparency (also know as alpha channel) which after the conversion to PDF appears as ugly black borders. Fortunately there is an easy fix for this problem, which I found in a mailing list message.
You will need to have ImageMagick installed for this to work. ImageMagick’s convert command line tool allows you to convert the transparent part into proper colours rather than a grey layer with added transparency information (which is what throws the tex-to- PDF converter). Before you add those images to the tex file, convert them like this: