Socket
Book a DemoInstallSign in
Socket

maxmin-filter

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

maxmin-filter

Max-Min filter of image

Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

node-maxmin-filter

Max-Min filter of image implemented in JavaScript. Both in Node.js and browser.

  • Demo

Install

$ npm install maxmin-filter

Usage

I made it as an ndarray module. So, the simplest usage is with get-pixels and save-pixels as below.

See examples for more.

const fs = require('fs')
const savePixels = require('save-pixels')
const getPixels = require('get-pixels')
const maxminFilter = require('maxmin-filter')

getPixels('src.png', (err, pixels) => {
  if (err) {
    throw err
  }
  let filtered = maxminFilter(pixels)
  savePixels(filtered, 'png').pipe(fs.createWriteStream('dist.png'))
})

Keywords

filter

FAQs

Package last updated on 15 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts