Convert SVGs into Android or iOS compatible asset formats.
Upload size limit: 500kB; Timeout limit: 5 sec; Process limit: 5 simultaneous requests.
Download
Source code
Limitations
- Conversion may fail on SVG files that may contain complex or unsupported elements.
Online version
- Maximum upload size limit is 500kB.
- Queue is set up to 5 simultaneous requests.
Requirements
- Java Runtime Environment, version 17 or later
Usage
java -jar svg2asset.jar --inputPath [INPUT_PATH] --outputPath [OUTPUT_PATH] --outputType [OUTPUT_TYPE]
Options
-i, --inputPath [INPUT_PATH] - Path to input image
-o, --outputPath [OUTPUT_PATH] - Path to output asset
-t, --outputType [OUTPUT_TYPE] - Type of asset for output ("android" or "ios")
Example
With following command:
java -jar svg2asset.jar --inputPath ./image.svg --outputPath ./image.xml --outputType android
The input file will be converted to XML vector drawable format.
With following command:
java -jar svg2asset.jar --inputPath ./image.svg --outputPath ./image.pdf --outputType ios
The input file will be converted to PDF document which can be used as an image asset for iOS platform.
License
This program is licensed under AGPL-3.0-only.