New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

to-image-data

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

to-image-data

Convert Nested Numerical Arrays into ImageData Data Array

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

to-image-data

Convert Nested Numerical Arrays into ImageData

features

  • Handles Numerical Arrays in Any Layout
  • Handles Missing Alpha Band

install

npm install to-image-data

usage

import toImageData from "to-image-data";

const bands = [
  [123, 42, 42, ... ], // red
  [44, 84, 12, ... ], // green
  [48, 72, 52, ... ], // blue
];

const imageData = toImageData(bands);
// { height: 768, width: 1024, data: Uint8ClampedArray[123, 44, 48, 255, 42, 84, 72, 255, ...] }

Keywords

data

FAQs

Package last updated on 29 Sep 2021

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