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

get-image-data

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-image-data

A browser/server utility that extracts RGBA data from images.

  • 0.0.1
  • npm
  • Socket score

Version published
Weekly downloads
428
increased by109.8%
Maintainers
1
Weekly downloads
 
Created
Source

get-image-data

get-image-data is a browser/server utility that extracts RGBA data from images.

Build status

Browser support

Install

$ npm install get-image-data

Usage

Browser & Server

var image = require('get-image-data')

image('./image.jpg', function(error, data) {
  for (var i = 0, l = data.length, i < l; i += 4) {
    var red = data[i]
    var green = data[i + 1]
    var blue = data[i + 2]
    var alpha = data[i + 3]  
  }
})

Note

The image data will contained within either a Uint8ClampedArray or a CanvasPixelArray depending on the environment. This shouldn’t be a problem, but it’s worth knowing.

License

MIT

Keywords

FAQs

Package last updated on 30 Oct 2013

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