Closed MatrixManAtYrService closed 2 years ago
A bit more hacking around and I can repoduce this error outside of ipython:
tkiz.tex
\documentclass[convert={convertexe={convert},density=300,size=400x240,outext=.png},border=0pt]{standalone}
\usepackage[]{tikz}
\begin{document}
\begin{tikzpicture}[scale=1,]
\draw (0,0) rectangle (1,1);
\filldraw (0.5,0.5) circle (.1);
\end{tikzpicture}
\end{document}
$ pdflatex --shell-escape tkiz.tex
...
convert-im6.q16: profile 'icc': 'RGB ': RGB color space not permitted on grayscale PNG `tikz.png' @ warning/png.c/MagickPNGWarningHandler/1667.
It looks like the arguments to documentclass
are passed through to imagemagick, but trying to add colorspace=RGB
gives an error:
\documentclass[convert={convertexe={convert},colorspace=RGB,density=300,size=400x240,outext=.png},border=0pt]{standalone}
Gives an error:
! Package xkeyval Error: `colorspace' undefined in families `standalone.cls/convert'.
same goes for adding define=colorspace:auto-grayscale=false
Hahaha, that's a warning, not an error. I had wrongly assumed that it was triggering this functionality., so I set about working around it. But that was silly because pdflatex
still returns 0 in the event of warnings.
I found a workaround, but the awkward logs were still showing up. That's a separate issue.
When I try to use the tikz in the readme:
I get this output:
It would appear that ImageMagick is noticing that the output is not RGB and not-so-helpfully changing the filetype for us as discussed here.
There are proposed solutions in that repo, but how can I make tikzmagic use them?