Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ndarray-pixel-sort

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ndarray-pixel-sort

A JS implementation of Kim Asendorf's pixel sort glitch technique using ndarrays

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ndarray-pixel-sort experimental

A JS implementation of Kim Asendorf's pixel sort glitch technique using ndarrays.

Works in the browser using browserify, or server-side with Node.

ndarray-pixel-sort

Usage

NPM

sort(image, filterfn, sortfn)

Applies a pixel sort to an image.

  • image: the ndarray image to sort. Modified in-place.
  • filterfn(r, g, b): takes the color of a pixel and returns true if it should be sorted.
  • sortfn(a, b): a sort comparison function that takes two color [r, g, b] arrays – should return 0 if equal, above 0 if a > b and below 0 if a < b.

Check the code in test.js for example usage.

License

MIT. See LICENSE.md for details.

Keywords

FAQs

Package last updated on 05 Sep 2014

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc