Skip to content

mizucoffee/sus-2-image

Repository files navigation

sus-2-image

SeaUrchinScore to Image for node

npm sus:v2.17.0

Description

*.sus to Image.

Installation

$ yarn add sus-2-image

How to use

const Sus2Image = require('sus-2-image')
const fs = require('fs')

const sus = fs.readFileSync('example.sus','utf8')

Sus2Image.getSVG(sus).then(image => {
  fs.writeFileSync(`score.svg` , image)
})

Sus2Image.getPNG(sus).then(image => {
  fs.writeFileSync(`score.png` , image)
})

Sus2Image.getPNGs(sus).then(images => {
  images.forEach((image, index) => {
    fs.writeFileSync(`score_${index}.png` , image)
  })
})

About

SeaUrchinScore to Image for node

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published