Lambda function to convert SVG to PNG using PhantomJS.
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
Input:
svg
(string) base64 SVG inputwidth
(number) width of SVG (optional)height
(number) height of SVG (optional)
Output:
image
(string) base64 PNG
tjholowaychuk.com · GitHub @tj · Twitter @tjholowaychuk