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

@canvas/image-data

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

@canvas/image-data

An `ImageData` implementation for usage outside of the browser.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
62K
decreased by-0.76%
Maintainers
1
Weekly downloads
 
Created
Source

ImageData

An ImageData implementation for usage outside of the browser.

Installation

npm install --save @canvas/image-data

Usage

const ImageData = require('@canvas/image-data')

const img = new ImageData(2, 4)

console.log(img.width)
//=> 2

console.log(img.height)
//=> 4

console.log(img.data)
//=> Uint8ClampedArray [ 0, 0, 0, 0, 0, ... ]

Hacking

The tests are made to be run against both this implementation and Chrome's implementation to make sure that we behave in the same way. You can run the tests in Chrome by spinning up a local web server and open test.html.

FAQs

Package last updated on 20 Nov 2018

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