{"name":"pixelsmith","description":"Node based engine for spritesmith","version":"2.4.1","homepage":"https://github.com/twolfson/pixelsmith","author":{"name":"Todd Wolfson","email":"todd@twolfson.com","url":"http://twolfson.com/"},"repository":{"type":"git","url":"git://github.com/twolfson/pixelsmith.git"},"bugs":{"url":"https://github.com/twolfson/pixelsmith/issues"},"licenses":"Unlicense","main":"lib/engine","engines":{"node":">= 8.0.0"},"scripts":{"precheck":"twolfson-style precheck lib/ test/","lint":"twolfson-style lint lib/ test/","pretest":"twolfson-style install","test":"npm run precheck && mocha --reporter dot && npm run lint"},"dependencies":{"async":"~0.9.0","concat-stream":"~1.5.1","get-pixels":"~3.3.0","mime-types":"~2.1.7","ndarray":"~1.0.15","obj-extend":"~0.1.0","save-pixels":"~2.3.0","vinyl-file":"~1.3.0"},"devDependencies":{"foundry":"~4.3.2","foundry-release-git":"~2.0.2","foundry-release-npm":"~2.0.2","jscs":"~1.7.3","jshint":"~2.5.10","mocha":"~1.21.4","spritesmith-engine-test":"~5.0.0","twolfson-style":"~1.6.0"},"keywords":["spritesmith","image","spritesmith-engine"],"foundry":{"releaseCommands":["foundry-release-git","foundry-release-npm"]},"gitHead":"2f405dbffe36e22096ddb97ab75f5e0819f851ff","_id":"pixelsmith@2.4.1","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"twolfson","email":"todd@twolfson.com"},"dist":{"integrity":"sha512-6lVOPf9eBd9bWfxo5efmJcAiF6y65Ui9Ir8IR8jocrj/v/8QoLWZmgnhO7KGUfqkwPLNlCBfxVdjp4QihdPmPQ==","shasum":"4ccfecf6eb5447da1d38fe26f2d70d246a40179e","tarball":"http://registry-npm.ywwl.com/pixelsmith/download/pixelsmith-2.4.1.tgz","fileCount":16,"unpackedSize":31746,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdfAovCRA9TVsSAnZWagAA+bkP/ja+keOuIvbgh2qofVkq\nRlqI2IGI4K1a4XTZyt/SzAN0drDYyMKhDShy2hdNN7DNwGJhxngxZ/9kKPvV\n+FjbyTT9YDJGoNgKVZyEI6C1xDW+mhN/Ca1weOkH1bGjFDF1+wT36P1f72E7\nDO7Dj6aObpM+lAESnjrLY8CNy6vX+HZNVNSKnrL+z8KdSUPK/mkKpENX9lVN\nS5WbMaPz/PSNV1SFAMIGReXiWKfjeRwH/LV6bKEILWFmC6YpAwkdGXdGnGEa\ny4xPU4Sum8dHqxMlnnWqV/mOqru+BZo0Y+p0AUf57XC7jS3UypoU6XDCkg0r\nawt7dwaEQD/rNHY/mJ4S2c5IXSs182ad1aqvDnDmBz0mjGq4fsX2HYKQ6TBl\nIpFFkmhBrOCQr0asAWTrIAstRkkNbF0rbq7VW58gPOyBrSmBmbyo483zF2Yx\nY/XGWa9VcN1E0wReJez0hvU/K/VZHKTaY5dZWtBKGXKAqHxJ59/o8H4BPhkh\nafxPVfKdwYr03gAkLK1M0b4uif3somCdrhae914AweUOFcjss0sgn34dsgfQ\nXLDOJH2nA54azaAfnV8VcNrx5+cf6XaEumi9CRKmgxNj/DT9PTxOxDJV78YZ\njlLiInmXhm3WwaL7I+QrFpld5aEa5FAnAWkfRcgFBpjCKJOrx8a6mzQ+tV/l\nacgy\r\n=il+y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC5fBc3YmQvI43ws6jc1sJXZFcwGiMAtv/56A45F3L4RAiEA6YqgbUm5isgRVvl2Apwa/v7HjanIC+pFVJV2MVTiROI="}],"size":18226,"noattachment":false,"key":"/pixelsmith/-/pixelsmith-2.4.1.tgz"},"maintainers":[{"name":"twolfson","email":"todd@twolfson.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pixelsmith_2.4.1_1568410158907_0.8453192412948107"},"_hasShrinkwrap":false,"readme":"# pixelsmith [![Build Status](https://app.travis-ci.com/twolfson/pixelsmith.svg?branch=master)](https://app.travis-ci.com/twolfson/pixelsmith)\n\nNode based engine for [spritesmith][] built of top of [get-pixels][] and [save-pixels][].\n\n[spritesmith]: https://github.com/Ensighten/spritesmith\n[get-pixels]: https://github.com/mikolalysenko/get-pixels\n[save-pixels]: https://github.com/mikolalysenko/save-pixels\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 pixelsmith`\n\n```js\n// Load in our dependencies\nvar Pixelsmith = require('pixelsmith');\n\n// Create a new engine\nvar pixelsmith = new Pixelsmith();\n\n// Interpret some images from disk\npixelsmith.createImages(['img1.jpg', 'img2.png'], function handleImages (err, imgs) {\n  // If there was an error, throw it\n  if (err) {\n    throw err;\n  }\n\n  // We recieve images in the same order they were given\n  imgs[0].width; // 50 (pixels)\n  imgs[0].height; // 100 (pixels)\n\n  // Create a canvas that fits our images (200px wide, 300px tall)\n  var canvas = pixelsmith.createCanvas(200, 300);\n\n  // Add the images to our canvas (at x=0, y=0 and x=50, y=100 respectively)\n  canvas.addImage(imgs[0], 0, 0);\n  canvas.addImage(imgs[1], 50, 100);\n\n  // Export canvas to image\n  var resultStream = canvas['export']({format: 'png'});\n  resultStream; // Readable stream outputting PNG image of the canvas\n});\n```\n\n## Documentation\nThis module was built to the specification for spritesmith engines.\n\n**Specification version:** 2.0.0\n\nhttps://github.com/twolfson/spritesmith-engine-spec/tree/2.0.0\n\n### `Engine(options)`\nOur `engine` constructor supports the following options:\n\n- options `Object` - Optional container for various settings\n    - concurrentFileLimit `Number` - Amount of files to load concurrently via `createImages`\n        - May be useful if bumping into `EMFILE` (file descriptor limit)\n\n### `engine.createImages(images, cb)`\nOur `createImages` methods supports the following types of images:\n\n- image `String` - Filepath to image\n- image `Object` - Vinyl object with buffer for image (uses buffer)\n- image `Object` - Vinyl object with stream for image (uses stream)\n- image `Object` - Vinyl object with `null` for image (reads buffer from provided filepath)\n\n### `canvas.export(options)`\nOur `export` method provides support for the following options:\n\n- options `Object`\n    - background `Number[]` - `rgba` array of value for background\n        - By default, the background is `[0, 0, 0, 0]` (transparent black)\n        - `[0]` - Red value for background\n            - Can range from 0 to 255\n        - `[1]` - Green value for background\n            - Can range from 0 to 255\n        - `[2]` - Blue value for background\n            - Can range from 0 to 255\n        - `[3]` - Alpha/transparency value for background\n            - Can range from 0 to 255\n    - quality `Number` - Optional quality percentage for JPEG images\n        - This value can range from 0 to 100\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 via `npm run lint` and test via `npm test`.\n\n## Donating\nSupport this project and [others by twolfson][twolfson-projects] via [donations][twolfson-support-me].\n\n<http://twolfson.com/support-me>\n\n[twolfson-projects]: http://twolfson.com/projects\n[twolfson-support-me]: http://twolfson.com/support-me\n\n## Unlicense\nAs of Nov 24 2014, 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","publish_time":1568410159089,"_cnpm_publish_time":1568410159089,"dist-tags":{"latest":"2.6.0"}}