Convert Vector Drawable to SVG
12,579
Solution 1
Have a look at this Convert VectorDrawable to SVG
The Vector Drawable format is pretty similar to SVG. With just a few modifications you can turn your xml drawable back to SVG
Credits to this guy who made this python script that coverts xml drawables back to SVG https://gitlab.com/Hyperion777/VectorDrawable2Svg
Solution 2
Look at this Shapeshifter
Shapeshifter tool can import VectorDrawable XML file and export back to SVG file
Author by
sadat
I am a passionate mobile application developer and always look for solving problems.
Updated on June 28, 2022Comments
-
sadat almost 2 years
Is there any tool to convert Vector Drawable to SVG? I lost my original svg file and now I would like to reduce the size of the image. Currently, I have,
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="1200dp" android:height="1200dp" android:viewportHeight="1200" android:viewportWidth="1200">
I would like to make it 180x180. Thanks in advance.
-
pskink over 6 yearsdo you want to remove some points on your path? change them somehow? or just "scale down"?
-
sadat over 6 yearsI just wanna scale it down.
-
pskink over 6 yearsso this is pointless - it does not matter how big your
android:viewportWidth
/android:viewportHeight
are, as the vector drawable is scalable and can be drawn with any size on the target canvas -
Xenolion over 6 yearsCant you just edit and width to
800dp
to reduce its size? -
sadat over 6 yearsThanks. I know that. But I am having inflationexception due to using such a big image. There are quite a few posts in stackoverflow.
-
pskink over 6 yearswhat exception? post the stacktrace
-
sadat over 6 yearsInflateException @pskink
-
pskink over 6 yearspost the stacktrace
-
Faris Kapo over 6 yearsDoes the solution have to be trough code ?
-
-
NoHarmDan about 3 yearsBy far the fastest and easiest solution
-
pallgeuer almost 3 yearsFor me it didn't support gradients (
<gradient>
tag in vector drawable), so I couldn't use it in my case