I would like to make the background transparent. In Texmaker, if I right-click on the TikZ picture, I can save it as a png image as follows
If I save this picture, I get the white background. Is there a way to remove it?
\documentclass[border=10pt,tikz]{standalone}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{calc,fit,arrows.meta, positioning}
\usepackage{graphicx}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}[auto,node distance=3cm,>={Stealth[width=4mm, length=6mm, fill=red]}]
\coordinate (O) at (5,0);
\draw [very thick,fill=green,fill opacity=.2]
(-4, 4) circle (2.0cm) node [fill opacity=1]{\textbf{A}};
\end{tikzpicture}
\end{document}
Best Answer
The problem is very likely the use of transparency (option
fill opacity
). The following examples used opaque colors, the lightgreen is achieved by mixing green with white:This file can be converted to a PNG file, where the background is transparent:
The PNG image was converted via ghostscript, full command line of the conversion: