Synchronously parse a PNG file
This is a fork of
pngparse that synchronously parses PNG data encoded as buffers. It works in both node.js and browserify.
var fs =var parsePNG =console
npm install pngparse-sync
Parses a buffer synchronously into a PNG
null if there was an error parsing the PNG file, or an object with the following properties:
widththe width of the image in pixels
heightthe height of the image in pixels
channelsthe number of channels in the image
dataa Uint8Array storing the pixels of the image
This software is available in the public domain.
pngparse was originally written by @ironwallaby
pngparse-sync port by Mikola Lysenko.