1.0.4 • Published 2 years ago
sgimgmeta v1.0.4
Usage
const {getImgMeta, getImgMetaSync} = require("sgimgmeta");
// async
console.log(await getImgMeta("mypng.jpg"));
// sync
console.log(getImgMetaSync("mypng.jpg"));
// outputs
{
file:"mypng.jpg", // path of file
width: 200, // width size
height: 200, // height size
alpha: true, // img has alpha data
type: "png" // type from data header
}