1.0.2 • Published 5 years ago

filter-images v1.0.2

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

Filter-Images

Description

  • Canvas implements image filter function

Link

Install

$ npm install filter-images

Using Filter-Images

// import package
import filterImages from 'filter-images'

// Basic usage
filterImages.filter(type, element, img)

// Successful callback
filterImages.filter(type, element, img).then(() => {})

// Failure callback
filterImages.filter(type, element, img).catch(() => {})

Parameter

  • Type

    Specify a filter name

typeExampledescription
null/false/0/undefinedfilter(false, element, img)Copy images to Canvas
bawfilter('baw', element, img)Black and white filter
mirrorfilter('mirror', element, img)mirror filter
sculpturefilter('sculpture', element, img)sculpture filter
invertfilter('invert, element, img)Inverted filter
grayfilter('gray', element, img)gray filter
blurfilter('blur', element, img)blur filter
relieffilter('relief', element, img)Embossing filter
  • Element

    Pass in a parent element to hold the generated canvas

  • Img

    Image to be processed

1.0.2

5 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.0.1

6 years ago