Skip to content

Latest commit

 

History

History
48 lines (30 loc) · 903 Bytes

Readme.md

File metadata and controls

48 lines (30 loc) · 903 Bytes

svg_to_png

Lambda function to convert SVG to PNG using PhantomJS.

Installation

Add svg_to_png to your Apex project:

$ git submodule add https://github.com/apex/svg_to_png.git functions/svg_to_png

Deploy it:

$ apex deploy svg_to_png

Try it:

$ apex invoke svg_to_png < functions/svg_to_png/event.json

API

Input:

  • svg (string) base64 SVG input
  • width (number) width of SVG (optional)
  • height (number) height of SVG (optional)

Output:

  • image (string) base64 PNG

Badges


tjholowaychuk.com  ·  GitHub @tj  ·  Twitter @tjholowaychuk