[Tex/LaTex] Is it possible to invert/substitute the colors of included graphics

beamercolorgraphics

I want to use the beamer package with a white on black style to create presentations. I included a simple switch to choose black on white for printout. Is there any possibility to also invert the colors of included graphics (maybe only black on white) or define some substitution rules for colors in included graphics?

Best Answer

If you use PNG or another bitmap file, you can preprocess your file with Imagemagick.

convert -negate in.png out.png

This also works for PDFs. However, the vector data is rasterised and that's not what you aim for.

Edit:

You can preprocess the file with inkscape. Load the pdf file, then select Extensions → Colour → Negative, and the paper size of the size of your imported PDF. This yields a non-rasterised, inverted PDF.