# to-image-data

> Convert Nested Numerical Arrays into ImageData Data Array

Latest version **0.0.2** (published 2021-09-29) · CC0-1.0 license · 0 weekly downloads

## Install

```sh
npm install to-image-data
pnpm add to-image-data
yarn add to-image-data
bun add to-image-data
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2021-09-29 |
| First published | 2021-09-27 |
| Weekly downloads | 0 |
| License | CC0-1.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 10.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Daniel J. Dufour |
| Maintainers | danieljdufour |
| Keywords | data, im, image, jpg, pixels, png, reform |

## Links

- npm: https://www.npmjs.com/package/to-image-data
- Repository: https://github.com/DanielJDufour/to-image-data
- Homepage: https://github.com/DanielJDufour/to-image-data#readme
- Issues: https://github.com/DanielJDufour/to-image-data/issues
- npm.io page: https://npm.io/package/to-image-data

## Dependencies (2)

- [xdim](https://npm.io/package/xdim.md) ^1.2.1
- [guess-image-layout](https://npm.io/package/guess-image-layout.md) ^0.0.3

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2021-09-29
- 0.0.1 — 2021-09-27

## README

# to-image-data
> Convert Nested Numerical Arrays into [ImageData](https://developer.mozilla.org/en-US/docs/Web/API/ImageData/ImageData)

# features
- Handles Numerical Arrays in Any Layout 
- Handles Missing Alpha Band

# install
```bash
npm install to-image-data
```

# usage
```js
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, ...] }
```

---
_Source: https://npm.io/package/to-image-data · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
