An open API service indexing awesome lists of open source software.

https://github.com/neocotic/convert-svg

Node.js packages for converting SVG into other formats using headless Chromium
https://github.com/neocotic/convert-svg

converter javascript jpeg nodejs png svg

Last synced: 2 months ago
JSON representation

Node.js packages for converting SVG into other formats using headless Chromium

Awesome Lists containing this project

README

        

# convert-svg

[![Build Status](https://img.shields.io/github/workflow/status/neocotic/convert-svg/CI/main?style=flat-square)](https://github.com/neocotic/convert-svg/actions/workflows/ci.yml)
[![License](https://img.shields.io/github/license/neocotic/convert-svg.svg?style=flat-square)](https://github.com/neocotic/convert-svg/blob/main/LICENSE.md)
[![Release](https://img.shields.io/github/release/neocotic/convert-svg.svg?style=flat-square)](https://github.com/neocotic/convert-svg)

This monorepo contains the following [Node.js](https://nodejs.org) packages that can convert a SVG into another format
using headless Chromium:

* [convert-svg-core](https://github.com/neocotic/convert-svg/tree/main/packages/convert-svg-core)
* [convert-svg-test-helper](https://github.com/neocotic/convert-svg/tree/main/packages/convert-svg-test-helper)
* [convert-svg-to-jpeg](https://github.com/neocotic/convert-svg/tree/main/packages/convert-svg-to-jpeg)
* [convert-svg-to-png](https://github.com/neocotic/convert-svg/tree/main/packages/convert-svg-to-png)
* [convert-svg-to-webp](https://github.com/neocotic/convert-svg/tree/main/packages/convert-svg-to-webp)

The first two packages are core dependencies for SVG converters, which make up the remainder of the packages, trying to
adhere to the following naming convention:

convert-svg-to-

It works by using headless Chromium to take a screenshot of the SVG and outputs the buffer. This does mean that the
supported output formats is limited to those supported by that the API for headless Chromium, however, as more formats
are added, additional packages can easily be created.

Each of the SVG converters will share a common API and CLI with the same options, however, some converters may come with
additional options specific for their output format.

Click on the links above for the SVG converters for more information on how to install, use, and even contribute to
them.

## License

Copyright © 2022 neocotic

See [LICENSE.md](https://github.com/neocotic/convert-svg/raw/main/LICENSE.md) for more information on our MIT license.