Code Monkey home page Code Monkey logo

image-js's Introduction

image-js

NPM version build status Test coverage npm download

Image processing and manipulation in JavaScript.

Installation

$ npm install image-js

Features

Supported image formats

The following formats can be loaded by image-js:

  • PNG (8 or 16 bits, color or greyscale, with or without alpha)
  • JPEG
  • TIFF (8 or 16 bits, greyscale)

The following formats can be saved by image-js:

  • PNG (8 or 16 bits)
  • JPEG
  • BMP (black and white)

Native support for various bit depths and image kinds

image-js was developed to be used in scientific applications where we often have to work on images that have more that 8 bits per channel.
Unlike many other libraries, if a 16-bit greyscale PNG is decoded, the resulting image has only one 16-bit channel and no pixel information is lost.

image-js can work with images that have 1 (binary), 8, 16 or 32 bits per channel.
It can accept an arbitrary amount of color channels (usually 1 or 3) and can handle an additional alpha component.

Basic image manipulation

image-js can be used to do simple image manipulations such as:

  • Resize
  • Crop
  • Rotate
  • Convert to greyscale
  • Invert colors
  • Gaussian blur
  • Extract individual channels (red, green or blue)
  • And more...

Statistics

image-js implements a number of functions to get statistics about an image:

  • Histogram
  • Max, min, median value
  • And more ...

Advanced features for computer vision

  • Image thresholding (otsu, triangle, ...)
  • Regions of interest
  • Convolution with custom kernel
  • Sobel filter
  • Morphological transformations (open, close, erode, ...)

Development

Contributions to code or documentation are welcome! Here are a few tips on how to setup a development environment for image-js.

Canvas

The canvas native addon library is required for all tests to pass. You can follow the instructions to install it on your OS here.

License

MIT

image-js's People

Contributors

targos avatar lpatiny avatar cheminfo-bot avatar greenkeeper[bot] avatar stropitek avatar jajoe avatar juldenereaz avatar greenkeeperio-bot avatar kellyjoha avatar andcastillo avatar fabian0007 avatar klowner avatar nayangupta824 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.