I want to use the conversion options of the standalone package to produce a PNG image file from a LaTeX source file. The package documentation lists two tables with options for conversion. The normal options are usable inside the convert class options, the advanced options are usable inside ... that's the question now. From the documentation examples and experiments I know that they are usable within a standalone.cfg file. But, my question is, if I could use them inside my source files directly somehow.
Here is a MWE of something I tried:
\documentclass[convert={density=600,size=400x400,outext=.png},crop,border=0mm]{standalone}
\usepackage{tikz}
% The following options are ignored at this place.
% It works if this is put inside a 'standalone.cfg' file
\standaloneconfig{convert={command={\convertexe\space -density \density\space
\infile\space
\ifx\size\empty\else -resize \size\fi\space
-quality 100\space
-define png:format=png32\space
-define png:compression-filter=4\space
\outfile}}}
\begin{document}
\begin{tikzpicture}
\shadedraw [shading=ball] (0,0) circle (2cm);
\end{tikzpicture}
\end{document}

- Putting the options inside the
\standaloneconfigmacro of the given MWE is ignored. - Putting the options inside the class options (I tried several things) leads to compilation errors.
Is there a solution where and how to put the options inside my source file or am I forced to use the standalone.cfg file? I would consider to have all options in one file a very desirable feature. Maybe, I'm just applying things wrong?
Update: Since nobody answered or commented my question the last two days, I guess it's not possible to use the advanced conversion options inside the source file (?). I would appreciate any comment ... can't imagine nobody tried this before ...
standalone, I would like to file it as feature request :-) – Thomas F. Sturm Nov 28 '13 at 14:05