png-info
Get information about a PNG from its headers
Install
npm install png-info
Usage
Most common lookups will have methods on pngInfo:
var image = fs;var pngInfo = image;var dimensions = pngInfo;// {width: 100, height: 150 }});
If you want to go deeper, you can access chunk data directly:
var image = fs;var pngInfo = image;var width = pngInfochunksIHDRwidth;// 100
Status
Only IHDR is currently implemented, please feel free to add any other chunks that you need:
- IHDR
- PLTE
- tRNS
- gAMA
- cHRM
- sRGB
- iCCP
- tEXt
- bKGD
- pHYs
- sBIT
- sPLT
- hIST
- tIME
Development
npm test
Please keep coverage at 100%