Post History
Another possibility is to use LaTeX. There are several ways in which you could use it to add a polygon on top of an image, one way is TikZ: % !TeX program = txs:///arara % arara: pdflatex: {synct...
Answer
#4: Post edited
- Another possibility is to use LaTeX. There are several ways in which you could use it to add a polygon on top of an image, one way is TikZ:
- ```
\documentclass[tikz]{standalone}- \begin{document}
- \begin{tikzpicture}[inner sep=0pt]
- \node {\includegraphics{example-image-duck}};
- \draw[red] (0.5,0.75) -- (0.75,0.5) -- (0.5,0.1) -- (0.25,0.5) -- cycle;
- \end{tikzpicture}
- \end{document}
- ```
- If you don't want to create a separate file with the LaTeX code, you can directly use it from the CLI via
- ```
pdflatex "\documentclass[tikz]{standalone}\begin{document}\begin{tikzpicture}[inner sep=0pt]ode {\includegraphics{example-image-duck}};\draw[red] (0.5,0.75) -- (0.75,0.5) -- (0.5,0.1) -- (0.25,0.5) -- cycle;\end{tikzpicture}\end{document}"```
- Another possibility is to use LaTeX. There are several ways in which you could use it to add a polygon on top of an image, one way is TikZ:
- ```
- % !TeX program = txs:///arara
- % arara: pdflatex: {synctex: on, interaction: nonstopmode, shell: yes}
- \documentclass[tikz,convert]{standalone}
- \begin{document}
- \begin{tikzpicture}[inner sep=0pt]
- \node {\includegraphics{example-image-duck}};
- \draw[red] (0.5,0.75) -- (0.75,0.5) -- (0.5,0.1) -- (0.25,0.5) -- cycle;
- \end{tikzpicture}
- \end{document}
- ```
- If compiled with shell-escape enabled, this will automatically convert the resulting vector image back into a pixel graphic.
- ---
- If you don't want to create a separate file with the LaTeX code, you can directly use it from the CLI via
- ```
- pdflatex --shell-escape "\documentclass[tikz,convert]{standalone}\begin{document}\begin{tikzpicture}[inner sep=0pt]
- ode {\includegraphics{example-image-duck}};\draw[red] (0.5,0.75) -- (0.75,0.5) -- (0.5,0.1) -- (0.25,0.5) -- cycle;\end{tikzpicture}\end{document}"
- ```
- See https://topanswers.xyz/tex?q=4461 for a review of tools to convert the resulting vector image back into a pixel graphic
#3: Post edited
Another possibility is to use latex. There are several ways in which you could use it to add a polygon on top of an image, one way is TikZ:- ```
- \documentclass[tikz]{standalone}
- \begin{document}
- \begin{tikzpicture}[inner sep=0pt]
- \node {\includegraphics{example-image-duck}};
- \draw[red] (0.5,0.75) -- (0.75,0.5) -- (0.5,0.1) -- (0.25,0.5) -- cycle;
- \end{tikzpicture}
- \end{document}
- ```
- If you don't want to create a separate file with the LaTeX code, you can directly use it from the CLI via
- ```
- pdflatex "\documentclass[tikz]{standalone}\begin{document}\begin{tikzpicture}[inner sep=0pt]\node {\includegraphics{example-image-duck}};\draw[red] (0.5,0.75) -- (0.75,0.5) -- (0.5,0.1) -- (0.25,0.5) -- cycle;\end{tikzpicture}\end{document}"
- ```
- Another possibility is to use LaTeX. There are several ways in which you could use it to add a polygon on top of an image, one way is TikZ:
- ```
- \documentclass[tikz]{standalone}
- \begin{document}
- \begin{tikzpicture}[inner sep=0pt]
- \node {\includegraphics{example-image-duck}};
- \draw[red] (0.5,0.75) -- (0.75,0.5) -- (0.5,0.1) -- (0.25,0.5) -- cycle;
- \end{tikzpicture}
- \end{document}
- ```
- If you don't want to create a separate file with the LaTeX code, you can directly use it from the CLI via
- ```
- pdflatex "\documentclass[tikz]{standalone}\begin{document}\begin{tikzpicture}[inner sep=0pt]\node {\includegraphics{example-image-duck}};\draw[red] (0.5,0.75) -- (0.75,0.5) -- (0.5,0.1) -- (0.25,0.5) -- cycle;\end{tikzpicture}\end{document}"
- ```
#2: Post edited
- Another possibility is to use latex. There are several ways in which you could use it to add a polygon on top of an image, one way is TikZ:
- ```
- \documentclass[tikz]{standalone}
- \begin{document}
- \begin{tikzpicture}[inner sep=0pt]
ode {\includegraphics{example-image-duck}};\draw[red] (0.5,0.75) -- (0.75,0.5) -- (0.5,0.1) -- (0.25,0.5) -- cycle;- \end{tikzpicture}
- \end{document}
- ```
- If you don't want to create a separate file with the LaTeX code, you can directly use it from the CLI via
- ```
- pdflatex "\documentclass[tikz]{standalone}\begin{document}\begin{tikzpicture}[inner sep=0pt]\node {\includegraphics{example-image-duck}};\draw[red] (0.5,0.75) -- (0.75,0.5) -- (0.5,0.1) -- (0.25,0.5) -- cycle;\end{tikzpicture}\end{document}"
- ```
- Another possibility is to use latex. There are several ways in which you could use it to add a polygon on top of an image, one way is TikZ:
- ```
- \documentclass[tikz]{standalone}
- \begin{document}
- \begin{tikzpicture}[inner sep=0pt]
- ode {\includegraphics{example-image-duck}};
- \draw[red] (0.5,0.75) -- (0.75,0.5) -- (0.5,0.1) -- (0.25,0.5) -- cycle;
- \end{tikzpicture}
- \end{document}
- ```
- If you don't want to create a separate file with the LaTeX code, you can directly use it from the CLI via
- ```
- pdflatex "\documentclass[tikz]{standalone}\begin{document}\begin{tikzpicture}[inner sep=0pt]\node {\includegraphics{example-image-duck}};\draw[red] (0.5,0.75) -- (0.75,0.5) -- (0.5,0.1) -- (0.25,0.5) -- cycle;\end{tikzpicture}\end{document}"
- ```
#1: Initial revision
Another possibility is to use latex. There are several ways in which you could use it to add a polygon on top of an image, one way is TikZ: ``` \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture}[inner sep=0pt] \node {\includegraphics{example-image-duck}}; \draw[red] (0.5,0.75) -- (0.75,0.5) -- (0.5,0.1) -- (0.25,0.5) -- cycle; \end{tikzpicture} \end{document} ``` If you don't want to create a separate file with the LaTeX code, you can directly use it from the CLI via ``` pdflatex "\documentclass[tikz]{standalone}\begin{document}\begin{tikzpicture}[inner sep=0pt]\node {\includegraphics{example-image-duck}};\draw[red] (0.5,0.75) -- (0.75,0.5) -- (0.5,0.1) -- (0.25,0.5) -- cycle;\end{tikzpicture}\end{document}" ```