Maggie
🌅 Get precious image info from an input file
This module does one thing right, returns information about the image selected in a html input file.
Install
$ npm i maggie -S
Examples
Log image width and height 🎆
; const inputElement = document; ;
Preview the selected image 🌊
;
Get the average color 👽
;
Info Object
The returned info
object has the following properties
Property | Type | Description |
---|---|---|
width | Number | Image width |
height | Number | Image height |
src | String | Image source |
element | HTMLImageElement | Image Dom element |
imageData | ImageData | ImageData element based on the image |
Author
@zzarcon 🍻