N
N
newdancer2018-01-28 15:20:52
Android
newdancer, 2018-01-28 15:20:52

How to convert svg xml icons to bitmap?

How to convert svg xml icons to bitmap? I load the icons from the server and in fact there is no other way except to use the Google library for conversion.
This one is suggested as an example:

SVG svg = SVGParser.getSVGFromResource(getResources(), R.raw.android);
PictureDrawable pictureDrawable = svg.createPictureDrawable();
Bitmap bitmap = Bitmap.createBitmap(pictureDrawable.getIntrinsicWidth(), pictureDrawable.getIntrinsicHeight(), Config.ARGB_8888);

and use this heavy library https://code.google.com/archive/p/svg-android/
Can anyone come across and know how to convert xml svg to pictures from a memory card? Or is it easier to use and load png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis Zagaevsky, 2018-01-28
@zagayevskiy

It's better to load png

E
Egor Polyakov, 2019-08-11
@inmotusdesign

Try using Inmotus SVG Generator ( https://bundlespace.com) > there is an example solution (for the logo):
https://bundlespace.com/intro/lessons/lesson-logo-...
Just import the SVG > into the left column. Apply style in the right column (you can set an empty added style) and upload to PNG or PDF (as convenient) > this batch processing will give the result in the archive.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question