0.0.3 • Published 4 years ago

node-css-image v0.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

Node CSS Image

Apply css filters to an image in nodejs and save.

Puppeteer v8

Installation

$ npm install node-css-image

Usage

const path = require('path')
const CssImage = require('node-css-image')

const samplePayload = {
  src: 'https://www.w3schools.com/CSSref/pineapple.jpg',
  height: 300,
  width: 300,
  filters: {
    sepia: 0.5,
    brightness: 1.25,
    saturate: 2
  },
  output: path.join(__dirname, 'sample2-output.png')
}

CssImage.save(samplePayload).then(() => console.log('Done')).catch((error) => {
  console.error('Failed', error)
})

License

MIT

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago