Convert an Uint8ClampedArray to an image
npm install array-to-imageConvert an Uint8ClampedArray to an image.
```
$ npm install --save array-to-image
`js
import { getImgFromArr } from 'array-to-image';
const data = new Uint8ClampedArray(256 256 4);
for(let i = 0; i < data.length; i += 4) {
data[i] = 255; // r
data[i + 1] = 0; // g
data[i + 2] = 0; // b
data[i + 3] = 255; // a
}
const img = getImgFromArr(data);
`
#### dataUrl = getDataUrlFromArr(arr, w, h)
Get a data url string from the given Uint8ClampedArray arr.w
If and h are ommitted, the image is considered to be squared.
#### img = getImgFromDataUrl(data)
Get an image from the given url string data.
#### img = getImgFromArr(arr, w, h)
Get an image from the given Uint8ClampedArray arr.w
If and h` are ommitted, the image is considered to be squared.
MIT, see LICENSE.md for more details.