{"name":"pixelsmith","description":"Node based engine for spritesmith","version":"2.2.2","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","ndarray-fill":"~1.0.1","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":"1188b827539ed4a8a073224e558537a4c5e4e1fa","_id":"pixelsmith@2.2.2","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"twolfson","email":"todd@twolfson.com"},"dist":{"integrity":"sha512-P8w60ocJxYsiQS3H2xXLv4na3e9AjfEesMtMpWtIKiMmwbnxGtLlbLAagYclPmVho0TRvBEqdAQYI4or7s75eA==","shasum":"93c101ee9512f4b29471fd58dfc92b4cad21e280","tarball":"http://registry-npm.ywwl.com/pixelsmith/download/pixelsmith-2.2.2.tgz","fileCount":15,"unpackedSize":30364,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJde1avCRA9TVsSAnZWagAAVnoP/3RDCTwLOeg+Mq3zBHVY\n/9d4kMeJf5KHtsKZGYaRoGyoT/UExRaZWwkB5pdsIPmkcUsWA0PAWX445170\nbaB5OYnp01hZeg32pQzprcYjXt3elt54iJmPBK91mnsSxhzeQ2vFGJB7oLti\n3ymZhLP/MwEja3P6uPXGEmyDoTToSzq+TfnQdhsDAf/5g1j4taJg+lWvmMWE\nTf0tdDCNAMS3bYPCuHBkt52ltoBi2/wOFOmtKrSPPDMEtylrNwYMKGdbOwjI\nL/M4EpXfWmQ/5T7ylli2AYmAxvPniPMhQSBOypKXU16IdbMfIrYhBMcMKPrj\n5g8pUKj3R9eR3kTNp88ohMXk3YnF8uMpyKQIPmt6BoPh3qJlXuOrZcj3zblo\nsO0lb7NAWwxw/oE8tWeKdgHLnIcsjQnrzCZ1SNd8JMmlRxZj/WM9vsKvKXrJ\nXACJIu14gSqxItv2mQYrABzj1jAPgk8zXkiSdqQfwzw9fL3INeEWywfmGhAb\nPT7sZqBHy32X2H6DgQg3Kbr0C7JKgp80/7C23Vx7m0PB21Mb7EQEpPs8+d9/\n6X/3/cqXk1/6bG/xg4uGh3tk0DcKcpgYNpE7XllC/fb9D5YN+YdZJxumlI/n\nlnMmSrEabjhlK/odruKNKXQ09paYmKeeV4vBKz0wCUt4bWJtZaZjJcowX0mP\n3UWP\r\n=zJbt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDT0FiKcfH8ak21NpuQOHXljV2qhiq6joAdj8rv+yV39gIgGVNIw4HUIgrEl/dmui9shtApCq5Gezi9q4k8NOMRYKQ="}],"size":17761,"noattachment":false,"key":"/pixelsmith/-/pixelsmith-2.2.2.tgz"},"maintainers":[{"name":"twolfson","email":"todd@twolfson.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pixelsmith_2.2.2_1568364206544_0.48855235779100514"},"_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":1568364206714,"_cnpm_publish_time":1568364206714,"dist-tags":{"latest":"2.6.0"}}