brainite / php-file-converters

Provide unified interface for file conversion.
https://www.brainite.org/php-file-converters
MIT License
24 stars 6 forks source link

SVG to PNG conversion with transparency #83

Open stackpr opened 7 years ago

stackpr commented 7 years ago

http://superuser.com/questions/516095/bake-an-svg-image-into-a-png-at-a-given-resolution

basic:
rsvg -w 2160 -h 1440 icon-recert.svg icon-recert.png

$ rsvg
Usage: rsvg [OPTIONS...] file.svg file.png
  -d, --dpi-x=<float>          pixels per inch
  -p, --dpi-y=<float>          pixels per inch
  -x, --x-zoom=<float>         x zoom factor
  -y, --y-zoom=<float>         y zoom factor
  -w, --width=<int>            width
  -h, --height=<int>           height
  -q, --quality=<int>          JPEG quality
  -f, --format=[png, jpeg]     save format
  -v, --version                show version information