{"name":"pngparse","version":"1.0.0","description":"convert PNG images to pixel arrays without dependencies","keywords":["png","image"],"author":{"name":"The Dark Sky Company","email":"devsupport@darkskyapp.com"},"repository":{"type":"git","url":"git://github.com/darkskyapp/pngparse.git"},"main":"./index","dependencies":{},"devDependencies":{"mocha":"1.3.x","chai":"1.2.x"},"_id":"pngparse@1.0.0","dist":{"shasum":"5f1bb36e7989ff945aec87af39d269ef2b5fb8d4","tarball":"http://registry-npm.ywwl.com/pngparse/download/pngparse-1.0.0.tgz","integrity":"sha512-tk4QttLB2XynPCu5OAuHCpbNBVPzDXTeVSD6tY9VFFA5IKQT7fMAcud5wMb/9wTUYxzrb3mI3fSCdu08LGxntg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDmlZl3Gei/BLgXIeSJ7F2TEbyOMXR+wyzYy6EAX5Jr5AIgTQi3EtBu1a2jNz+OgaSSvySairYPS0S+uFPBDWdiXGk="}],"size":321171,"noattachment":false,"key":"/pngparse/-/pngparse-1.0.0.tgz"},"_npmVersion":"1.1.62","_npmUser":{"name":"darkskyapp","email":"devsupport@darkskyapp.com"},"maintainers":[{"name":"darkskyapp","email":"devsupport@darkskyapp.com"}],"directories":{},"readme":"pngparse\n========\n\n`pngparse` is a pure-JavaScript library for [Node.JS](http://nodejs.org/) for\nconverting a PNG file into an array of pixel values. It came out of a need for\nreading PNG images in Node.JS for the [Dark Sky\nAPI](http://developer.darkskyapp.com/), but all existing libraries either had\ncompilation issues or did not support enough of the PNG standard to be\npractical.\n\nThere's a reason nobody writes PNG-parsing libraries. This stuff is complicated\nand reinventing the wheel is dumb. But, if you're wondering whether you can\ntrust it, it has a full unit test suite and we've been using it in production\nsince Sep 2012, so there you go.\n\nIt's reasonably complete, covering most PNG color types, depths, and filters;\nnotable omissions are lack of support for 16-bit images and interlacing.\n\nComments, bug fixes, feature improvements, etc. are all welcome. If you do\nwrite code, please ensure that you write tests for it!\n\nUsage\n-----\n\nTo install:\n\n    npm install pngparse\n\nTo use:\n\n    var pngparse = require(\"pngparse\")\n\n    ...\n\n    pngparse.parse(buffer, function(err, data) {\n      if(err)\n        throw err\n\n      /* do things! */\n    })\n\n    ...\n\n    pngparse.parseFile(\"path/to/file.png\", function(err, data) {\n      if(err)\n        throw err\n\n      /* do things! */\n    })\n\nThe `data` object returned from the callback bears a striking resemblance to\nthe [HTML5 Canvas ImageData\nobject](https://developer.mozilla.org/en-US/docs/DOM/ImageData). A notable\ndistinction is that the object returns has a `channels` property which\nindicates how many color channels it uses (while an HTML5 ImageData object is\nalways 4-channel). The possible color channel combinations are as follows:\n\n    1 channel : grayscale\n    2 channels: grayscale + alpha\n    3 channels: RGB\n    4 channels: RGBA\n\nIf you use the `ImageData.prototype.getPixel` method, this is handled for you;\nhowever, if you access the `data` array manually, then you will have to be\naware of it.\n","publish_time":1353420860277,"_cnpm_publish_time":1353420860277,"dist-tags":{"latest":"2.0.1"}}