Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/apex/svg_to_png
Lambda function to convert SVG to PNG using PhantomJS
https://github.com/apex/svg_to_png
Last synced: about 1 month ago
JSON representation
Lambda function to convert SVG to PNG using PhantomJS
- Host: GitHub
- URL: https://github.com/apex/svg_to_png
- Owner: apex
- Created: 2016-07-14T03:28:15.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-07-14T03:34:09.000Z (over 8 years ago)
- Last Synced: 2024-08-05T20:29:59.701Z (5 months ago)
- Language: JavaScript
- Size: 24.4 MB
- Stars: 71
- Watchers: 5
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
- awesome-functions - svg_to_png - Lambda function to convert SVG to PNG using PhantomJS. (AWS Lambda Functions)
README
# 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
![](https://img.shields.io/badge/license-MIT-blue.svg)
![](https://img.shields.io/badge/status-stable-green.svg)
[![](http://apex.sh/images/badge.svg)](https://apex.sh/ping/)---
> [tjholowaychuk.com](http://tjholowaychuk.com) ·
> GitHub [@tj](https://github.com/tj) ·
> Twitter [@tjholowaychuk](https://twitter.com/tjholowaychuk)