2

Is there a package that compiles a latex image to an icon of Launcher for Android while maintaining screen densities? For this in Android Studio there is Image Asset Studio, but no I manage to recreate the desired icon image.

Edited: In the following image marked with arrows shows the Launcher Icon, I used the tikzpeople package, but the sharpness and resolution of the image is not good.

enter image description here

2 Answers2

6

This is exactly what tikzpeople does. This is the title of the package documentation:

enter image description here

And here is the code for the picture:

\documentclass[tikz,margin=3mm]{standalone}
\usepackage{tikzpeople}
\begin{document}
\begin{tikzpicture}
    \node[graduate,shield,sword] {};
\end{tikzpicture}
\end{document}

enter image description here

5

Putting "Icons" into the packages search field on CTAN produces 17 hits

Interestingly one includes Knuth's own input enter image description here

but only a few are close to your request for modern App stylised output.

None will provide the android recommended / required res structure.

App studio recommends an SVG input, See Ulrike Fischer's comment as to how this may be achieved via latex + dvisvgm. however I found this produced an odd translucent result

Ignore the crude graphic note by default the collar is showing through the face enter image description here

For Martin Scharrer's pdf2svg tikzpicture method see /try his answer at https://tex.stackexchange.com/a/51766/170109
however I had problems running interactively so using on command line

I got a better opaque result (to produce this output, note it is the larger drawable-xxxhdpi since I cant upload the .svg)

So here is the enter image description herecode

\documentclass[crop,tikz,convert=pdf2svg]{standalone}
\usepackage{tikzpeople}
\begin{document}
\begin{tikzpicture}
    \node[graduate,saturated,mirrored,monitor,undershirt=yellow] {};
\end{tikzpicture}
\end{document}

via this sequence

Latex logo.tex
pdf2svg logo.pdf logo.svg

A windows version can be found here https://github.com/jalios/pdf2svg-windows/releases

And here it is loaded in Asset Studio and the download res file with 5 perfect images will be about 55KB (well lean! 130 if you include web version)

enter image description here

enter image description hereenter image description hereenter image description here

Whatever TeX / TikZ / SVG output takes your fancy. (that last one is blochsphere)

Alternately the icon you have identified and as shown in the answer by JouleV can be modified to suit a suite of the recommended pixel sizes.

The key to pixel sharpness is choosing a large enough scale that works for Hi-Res and can be divided down to smaller sizes, whilst retaining clarity in an application such as inkscape. The set of manually reduced icons can then be loaded and modified in Image Asset Studio to add the desired rounding etc.