node-css-image

0.0.3 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i node-css-image

Weekly Downloads

0

Version

0.0.3

License

ISC

Unpacked Size

6.01 kB

Total Files

5

Last publish

Collaborators

  • advplyr