{"_id":"pngsmith","_rev":"410028","name":"pngsmith","description":"png engine for spritesmith","dist-tags":{"latest":"0.1.5"},"maintainers":[{"name":"twolfson","email":"todd@twolfson.com"}],"time":{"modified":"2021-08-04T05:04:55.000Z","created":"2013-12-14T08:58:10.887Z","0.1.5":"2015-10-26T07:34:50.710Z","0.1.4":"2015-10-26T07:31:34.254Z","0.1.3":"2014-10-02T07:53:09.267Z","0.1.2":"2014-10-02T06:36:01.860Z","0.1.1":"2014-10-01T03:23:57.557Z","0.1.0":"2013-12-14T08:58:10.887Z"},"users":{},"author":{"name":"Todd Wolfson","email":"todd@twolfson.com","url":"http://twolfson.com/"},"repository":{"type":"git","url":"git://github.com/twolfson/pngsmith.git"},"versions":{"0.1.5":{"name":"pngsmith","description":"png engine for spritesmith","version":"0.1.5","homepage":"https://github.com/twolfson/pngsmith","author":{"name":"Todd Wolfson","email":"todd@twolfson.com","url":"http://twolfson.com/"},"repository":{"type":"git","url":"git://github.com/twolfson/pngsmith.git"},"bugs":{"url":"https://github.com/twolfson/pngsmith/issues"},"licenses":[{"type":"UNLICENSE","url":"https://github.com/twolfson/pngsmith/blob/master/UNLICENSE"}],"main":"lib/pngsmith","engines":{"node":">= 0.8.0"},"scripts":{"test":"mocha"},"dependencies":{"obj-extend":"~0.1.0","async":"~0.2.7","ndarray":"~1.0.9","save-pixels":"~0.3.0","get-pixels":"~1.0.1","concat-stream":"~1.2.1"},"devDependencies":{"chai":"~1.8.1","foundry":"~4.3.2","foundry-release-git":"~2.0.2","foundry-release-npm":"~2.0.2","grunt":"~0.4.2","grunt-contrib-jshint":"~0.7.2","grunt-contrib-watch":"~0.5.3","mocha":"~1.21.4","spritesmith-engine-test":"~2.0.0"},"keywords":["pngjs","png","spritesmith","image","layout","canvas"],"foundry":{"registerVersion":"0.1.0","releaseCommands":["foundry-release-git","foundry-release-npm"]},"gitHead":"843244e6fc27bc4963b11ec3bb32380d32aad5e9","_id":"pngsmith@0.1.5","_shasum":"38f13001426c5b75446b09297f5acc0f6e2a9001","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"twolfson","email":"todd@twolfson.com"},"maintainers":[{"name":"twolfson","email":"todd@twolfson.com"}],"dist":{"shasum":"38f13001426c5b75446b09297f5acc0f6e2a9001","size":5036,"noattachment":false,"key":"/pngsmith/-/pngsmith-0.1.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/pngsmith/download/pngsmith-0.1.5.tgz"},"directories":{},"publish_time":1445844890710,"_cnpm_publish_time":1445844890710,"_hasShrinkwrap":false},"0.1.4":{"name":"pngsmith","description":"png engine for spritesmith","version":"0.1.4","homepage":"https://github.com/twolfson/pngsmith","author":{"name":"Todd Wolfson","email":"todd@twolfson.com","url":"http://twolfson.com/"},"repository":{"type":"git","url":"git://github.com/twolfson/pngsmith.git"},"bugs":{"url":"https://github.com/twolfson/pngsmith/issues"},"licenses":[{"type":"UNLICENSE","url":"https://github.com/twolfson/pngsmith/blob/master/UNLICENSE"}],"main":"lib/pngsmith","engines":{"node":">= 0.8.0"},"scripts":{"test":"mocha"},"dependencies":{"obj-extend":"~0.1.0","async":"~0.2.7","ndarray":"~1.0.9","save-pixels":"~0.3.0","get-pixels":"~1.0.1","concat-stream":"~1.2.1"},"devDependencies":{"chai":"~1.8.1","foundry":"~4.3.2","foundry-release-git":"~2.0.2","foundry-release-npm":"~2.0.2","grunt":"~0.4.2","grunt-contrib-jshint":"~0.7.2","grunt-contrib-watch":"~0.5.3","mocha":"~1.21.4","spritesmith-engine-test":"~2.0.0"},"keywords":["pngjs","png","spritesmith","image","layout","canvas"],"foundry":{"registerVersion":"0.1.0","releaseCommands":["foundry-release-git","foundry-release-npm"]},"gitHead":"8269586006f5cf0e91d71daaab016aab48071275","_id":"pngsmith@0.1.4","_shasum":"9b419ee3be9781ce6533766e84cc703a1c27b66c","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"twolfson","email":"todd@twolfson.com"},"maintainers":[{"name":"twolfson","email":"todd@twolfson.com"}],"dist":{"shasum":"9b419ee3be9781ce6533766e84cc703a1c27b66c","size":4948,"noattachment":false,"key":"/pngsmith/-/pngsmith-0.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/pngsmith/download/pngsmith-0.1.4.tgz"},"directories":{},"publish_time":1445844694254,"_cnpm_publish_time":1445844694254,"_hasShrinkwrap":false},"0.1.3":{"name":"pngsmith","description":"png engine for spritesmith","version":"0.1.3","homepage":"https://github.com/twolfson/pngsmith","author":{"name":"Todd Wolfson","email":"todd@twolfson.com","url":"http://twolfson.com/"},"repository":{"type":"git","url":"git://github.com/twolfson/pngsmith.git"},"bugs":{"url":"https://github.com/twolfson/pngsmith/issues"},"licenses":[{"type":"UNLICENSE","url":"https://github.com/twolfson/pngsmith/blob/master/UNLICENSE"}],"main":"lib/pngsmith","engines":{"node":">= 0.8.0"},"scripts":{"test":"mocha"},"dependencies":{"obj-extend":"~0.1.0","async":"~0.2.7","ndarray":"~1.0.9","save-pixels":"~0.3.0","get-pixels":"~1.0.1","concat-stream":"~1.2.1"},"devDependencies":{"chai":"~1.8.1","grunt":"~0.4.2","grunt-contrib-jshint":"~0.7.2","grunt-contrib-watch":"~0.5.3","mocha":"~1.21.4","spritesmith-engine-test":"~2.0.0"},"keywords":["pngjs","png","spritesmith","image","layout","canvas"],"gitHead":"1b2be0b85ee6be9ba12a7b6fa6c228b74ac47074","_id":"pngsmith@0.1.3","_shasum":"72d30c1b93297b980c9f230cf71c9b1b4764c628","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"twolfson","email":"todd@twolfson.com"},"maintainers":[{"name":"twolfson","email":"todd@twolfson.com"}],"dist":{"shasum":"72d30c1b93297b980c9f230cf71c9b1b4764c628","size":4870,"noattachment":false,"key":"/pngsmith/-/pngsmith-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/pngsmith/download/pngsmith-0.1.3.tgz"},"directories":{},"publish_time":1412236389267,"_cnpm_publish_time":1412236389267,"_hasShrinkwrap":false},"0.1.2":{"name":"pngsmith","description":"png engine for spritesmith","version":"0.1.2","homepage":"https://github.com/twolfson/pngsmith","author":{"name":"Todd Wolfson","email":"todd@twolfson.com","url":"http://twolfson.com/"},"repository":{"type":"git","url":"git://github.com/twolfson/pngsmith.git"},"bugs":{"url":"https://github.com/twolfson/pngsmith/issues"},"licenses":[{"type":"UNLICENSE","url":"https://github.com/twolfson/pngsmith/blob/master/UNLICENSE"}],"main":"lib/pngsmith","engines":{"node":">= 0.8.0"},"scripts":{"test":"doubleshot"},"dependencies":{"obj-extend":"~0.1.0","async":"~0.2.7","ndarray":"~1.0.9","save-pixels":"~0.3.0","get-pixels":"~1.0.1","concat-stream":"~1.2.1"},"devDependencies":{"chai":"~1.8.1","doubleshot":"~2.13.1","grunt":"~0.4.2","grunt-contrib-jshint":"~0.7.2","grunt-contrib-watch":"~0.5.3","spritesmith-engine-test":"~1.2.1"},"keywords":["pngjs","png","spritesmith","image","layout","canvas"],"gitHead":"b9e2e16c28e2177cefc4e7d12d5454fd53b9422b","_id":"pngsmith@0.1.2","_shasum":"f926f35f5faa8cede65562891787085a6a34030d","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"twolfson","email":"todd@twolfson.com"},"maintainers":[{"name":"twolfson","email":"todd@twolfson.com"}],"dist":{"shasum":"f926f35f5faa8cede65562891787085a6a34030d","size":4892,"noattachment":false,"key":"/pngsmith/-/pngsmith-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/pngsmith/download/pngsmith-0.1.2.tgz"},"directories":{},"publish_time":1412231761860,"_cnpm_publish_time":1412231761860,"_hasShrinkwrap":false},"0.1.1":{"name":"pngsmith","description":"png engine for spritesmith","version":"0.1.1","homepage":"https://github.com/twolfson/pngsmith","author":{"name":"Todd Wolfson","email":"todd@twolfson.com","url":"http://twolfson.com/"},"repository":{"type":"git","url":"git://github.com/twolfson/pngsmith.git"},"bugs":{"url":"https://github.com/twolfson/pngsmith/issues"},"licenses":[{"type":"UNLICENSE","url":"https://github.com/twolfson/pngsmith/blob/master/UNLICENSE"}],"main":"lib/pngsmith","engines":{"node":">= 0.8.0"},"scripts":{"test":"doubleshot"},"dependencies":{"obj-extend":"~0.1.0","async":"~0.2.7","ndarray":"~1.0.9","save-pixels":"~0.3.0","get-pixels":"~1.0.1","concat-stream":"~1.2.1"},"devDependencies":{"chai":"~1.8.1","doubleshot":"~2.13.1","grunt":"~0.4.2","grunt-contrib-jshint":"~0.7.2","grunt-contrib-watch":"~0.5.3","spritesmith-engine-test":"~1.2.1"},"keywords":["pngjs","png","spritesmith","image","layout","canvas"],"gitHead":"42c11c08541d044fb4d5be166e1cfcf44e6016cf","_id":"pngsmith@0.1.1","_shasum":"573bcdf7abf40a911fbd3ab760f496cadc3fe8a1","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"twolfson","email":"todd@twolfson.com"},"maintainers":[{"name":"twolfson","email":"todd@twolfson.com"}],"dist":{"shasum":"573bcdf7abf40a911fbd3ab760f496cadc3fe8a1","size":4802,"noattachment":false,"key":"/pngsmith/-/pngsmith-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/pngsmith/download/pngsmith-0.1.1.tgz"},"directories":{},"publish_time":1412133837557,"_cnpm_publish_time":1412133837557,"_hasShrinkwrap":false},"0.1.0":{"name":"pngsmith","description":"png engine for spritesmith","version":"0.1.0","homepage":"https://github.com/twolfson/pngsmith","author":{"name":"Todd Wolfson","email":"todd@twolfson.com","url":"http://twolfson.com/"},"repository":{"type":"git","url":"git://github.com/twolfson/pngsmith.git"},"bugs":{"url":"https://github.com/twolfson/pngsmith/issues"},"licenses":[{"type":"UNLICENSE","url":"https://github.com/twolfson/pngsmith/blob/master/UNLICENSE"}],"main":"lib/pngsmith","engines":{"node":">= 0.8.0"},"scripts":{"test":"doubleshot"},"dependencies":{"obj-extend":"~0.1.0","async":"~0.2.7","ndarray":"~1.0.9","save-pixels":"~0.3.0","get-pixels":"~1.0.1","concat-stream":"~1.2.1"},"devDependencies":{"grunt":"~0.4.2","doubleshot":"~2.13.1","spritesmith-engine-test":"~1.1.0","chai":"~1.8.1","grunt-contrib-jshint":"~0.7.2","grunt-contrib-watch":"~0.5.3"},"keywords":["pngjs","png","spritesmith","image","layout","canvas"],"readmeFilename":"README.md","_id":"pngsmith@0.1.0","dist":{"shasum":"8859b81f2df2eeaafc29a11d9beaafd6f339578f","size":11286,"noattachment":false,"key":"/pngsmith/-/pngsmith-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pngsmith/download/pngsmith-0.1.0.tgz"},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"twolfson","email":"todd@twolfson.com"},"maintainers":[{"name":"twolfson","email":"todd@twolfson.com"}],"directories":{},"publish_time":1387011490887,"_cnpm_publish_time":1387011490887,"_hasShrinkwrap":false}},"readme":"# pngsmith [![Build status](https://travis-ci.org/twolfson/pngsmith.png?branch=master)](https://travis-ci.org/twolfson/pngsmith)\n\n## This project has been deprecated in favor of [pixelsmith][], a [spritesmith][] engine that additionally supports JPEG.\n\n`png` engine for [spritesmith][].\n\n[pixelsmith]: https://github.com/twolfson/pixelsmith\n[spritesmith]: https://github.com/Ensighten/spritesmith\n\nThis can be used for constructing a canvas, placing images on it, and extracting the result image.\n\n## Getting Started\nInstall the module with: `npm install pngsmith`\n\n```javascript\n// Convert images into pngsmith objects\nvar images = ['img1.jpg', 'img2.png'];\npngsmith.createImages(this.images, function handleImages (err, imgs) {\n  // Create a canvas to draw onto (200 pixels wide, 300 pixels tall)\n  pngsmith.createCanvas(200, 200, function (err, canvas) {\n    // Add each image at a specific location (upper left corner = {x, y})\n    var coordinatesArr = [{x: 0, y: 0}, {x: 50, y: 50}];\n    imgs.forEach(function (img, i) {\n      var coordinates = coordinatesArr[i];\n      canvas.addImage(img, coordinates.x, coordinates.y);\n    }, canvas);\n\n    // Export canvas to image\n    canvas['export']({format: 'png'}, function (err, result) {\n      result; // Binary string representing a PNG image of the canvas\n    });\n  });\n});\n```\n\n## Documentation\nThis module was built to the specification for all spritesmith modules.\n\nhttps://github.com/twolfson/spritesmith-engine-test\n\n## Contributing\nIn lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint using [grunt](https://github.com/gruntjs/grunt) and test via `npm test`.\n\n## Donating\nSupport this project and [others by twolfson][gittip] via [gittip][].\n\n[![Support via Gittip][gittip-badge]][gittip]\n\n[gittip-badge]: https://rawgithub.com/twolfson/gittip-badge/master/dist/gittip.png\n[gittip]: https://www.gittip.com/twolfson/\n\n## Unlicense\nAs of Dec 13 2013, Todd Wolfson has released this repository and its contents to the public domain.\n\nIt has been released under the [UNLICENSE][].\n\n[UNLICENSE]: UNLICENSE\n","_attachments":{},"homepage":"https://github.com/twolfson/pngsmith","bugs":{"url":"https://github.com/twolfson/pngsmith/issues"}}