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

  • What is a "Launcher for Android"? – AndréC Jan 13 '19 at 14:10
  • @AndréC When an app installed, an icon appears on the screen, for example, the WhatsApp icon is green with a phone drawing enclosed in a bubble. – Samuel Diaz Jan 13 '19 at 14:17
  • Add a screenshot on your question, perhaps? – AndréC Jan 13 '19 at 14:18
  • Look at tikzpeople package. – CarLaTeX Jan 13 '19 at 14:31
  • 1
    Which image format and resolution do you need for the icon? – user36296 Jan 13 '19 at 14:40
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.

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

  • 1
    If you look at the silhouette of the pic, you may discover a duck in it. ;-) (+1) – user121799 Jan 13 '19 at 16:10
  • 2
    Yes, but what I meant is this. ;-) – user121799 Jan 13 '19 at 16:29
  • 2
    \node[priest,evil] {}; – Money Oriented Programmer Jan 13 '19 at 16:30
  • 3
    As svg seems to be the wanted end format, you should add the dvisvgm option, and compile with latex + dvisvgm. – Ulrike Fischer Jan 13 '19 at 17:08
  • 2
    For those interested, here is a silhouette of it: i.stack.imgur.com/Msqb4.png. – Solomon Ucko Jan 13 '19 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.