{"name":"@jimp/plugin-crop","version":"0.6.0","description":"crop an image.","main":"dist/index.js","module":"es/index.js","scripts":{"test":"cross-env BABEL_ENV=test mocha --require @babel/register","test:watch":"npm run test -- --reporter min --watch","test:coverage":"nyc npm run test","build":"npm run build:node:production && npm run build:module","build:watch":"npm run build:node:debug -- -- --watch --verbose","build:debug":"npm run build:node:debug","build:module":"cross-env BABEL_ENV=module babel src -d es --source-maps --config-file ../../babel.config.js","build:node":"babel src -d dist --source-maps --config-file ../../babel.config.js","build:node:debug":"cross-env BABEL_ENV=development npm run build:node","build:node:production":"cross-env BABEL_ENV=production npm run build:node"},"author":"","license":"MIT","dependencies":{"@jimp/utils":"^0.6.0","core-js":"^2.5.7"},"devDependencies":{"@jimp/custom":"^0.6.0","@jimp/test-utils":"^0.6.0"},"peerDependencies":{"@jimp/custom":">=0.3.5"},"publishConfig":{"access":"public"},"gitHead":"ff78c045c32a9fff55f7fd92f72fa57409126485","_id":"@jimp/plugin-crop@0.6.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.0","_npmUser":{"name":"alisowski","email":"lisowski54@gmail.com"},"dist":{"integrity":"sha512-YftdmFZ2YnZDYyBulkStCt2MZbKKfbjytkE+6i3Djk2b/Rfryg5xjgzVnAumCRQJhVPukexrnc2V7KKbEgx7mQ==","shasum":"ef093b94327d3a2f642223a078861a96614367f5","tarball":"http://registry-npm.ywwl.com/@jimp/plugin-crop/download/@jimp/plugin-crop-0.6.0.tgz","fileCount":9,"unpackedSize":75019,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/utJCRA9TVsSAnZWagAAH8oP/jLEhj5ALXD8uArN6EM9\nRRor8BHsWgDefSfKU0Z2Ndz3qg0O+GrdnMQU4AkVn5lZp7Ym0AHbF/EPSLcI\nCOvtLZLuIT0wb+cHZIwKCE6BDVX6GLAYlFyk5drpml7C0YrlH1tOTUfg7+kg\nvU+0IOt83MUIH+9LhQDTdZC4UZ94/wz4EYTNczSfwgWFdhLaAXrCwTwa79GB\n3et9tNggz2vACWNH8crtbJDDl+Lq07/Md4qbIR/O8ozPxxqYoEvRsUJEj1W3\nNlR/W9s4aEPaztAPTVVvun7B4KA53/Vfwdjp/hqZYtzb1WqY5OehQafv67Cz\nsHazwVs/uINNA1ZCjFcMqwzDgR5plzg+e4xgEo8XCMo7YUNrGobaDHBlfhBb\nsMqdHfArQ/+oI0inVMAMsDuXDTx4j7AwB5jR+HA4x6cuw5/3bjq5gtR5RmKm\nQzvLzUvzejrVsFmyAv5I7RITDHNI/sMHdW06AXdFGTe9wNwRePAR5TD1pgcj\ngHHppKcDwcST3hVSyuogY9lEVQ5998ZHPZ64rJ5Zx09beTgnRk8KMrq9bdZ4\nfdoMq7ouHbaGJoW8sEUx83ZqwPogM/31UDdFFnxyINp5l1mXH+keyNeyU3Ez\nGo+ww3Iaxs5WILPhl0MB7j/fizgVFaqo7vNveSPrOmz4NDgNGEDymHn7TsZS\neSxr\r\n=JIEK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDYzOtRaa5G+Q2Vc+AYWucAtIye0Ea5G6lit8Kijb23wwIgJMcVcXVXCNBgco6rE8yAFmfKyhgQTWtZMIIy7PgvTfY="}],"size":9912,"noattachment":false,"key":"/@jimp/plugin-crop/-/@jimp/plugin-crop-0.6.0.tgz"},"maintainers":[{"name":"alisowski","email":"lisowski54@gmail.com"},{"name":"oliver.moran","email":"oliver@nth-iteration.ie"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-crop_0.6.0_1543433032656_0.8945840549730999"},"_hasShrinkwrap":false,"readme":"<div align=\"center\">\n  <img width=\"200\" height=\"200\"\n    src=\"https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png\">\n  <h1>@jimp/plugin-crop</h1>\n  <p>Crop an image.</p>\n</div>\n\n## Crop\n\nCrops the image at a given point to a give size\n\n- @param {number} x the x coordinate to crop form\n- @param {number} y the y coordinate to crop form\n- @param w the width of the crop region\n- @param h the height of the crop region\n- @param {function(Error, Jimp)} cb (optional) a callback for when complete\n\n```js\nimport jimp from \"jimp\";\n\nasync function main() {\n  const image = await jimp.read(\"test/image.png\");\n\n  image.crop(150, 150);\n}\n\nmain();\n```\n\n## AutoCrop\n\nAutoCrop same color borders from this image\n\n- @param {number} tolerance (optional): a percent value of tolerance for pixels color difference (default: 0.0002%)\n- @param {boolean} cropOnlyFrames (optional): flag to crop only real frames: all 4 sides of the image must have some border (default: true)\n\nor\n\n- @param {object} options object\n  - tolerance (optional): a percent value of tolerance for pixels color difference (default: 0.0002%)\n  - cropOnlyFrames (optional): flag to crop only real frames: all 4 sides of the image must have some border (default: true)\n  - cropSymmetric (optional): flag to force cropping top be symmetric. north and south / east and west are cropped by the same value\n  - leaveBorder (optional): integer of how many pixels of the background color to leave around the image\n\n```js\nimport jimp from \"jimp\";\n\nasync function main() {\n  const image = await jimp.read(\"test/image.png\");\n\n  image.autocrop();\n  image.autocrop({ cropOnlyFrames: false, cropSymmetric: true });\n}\n\nmain();\n```\n","publish_time":1543433032795,"_cnpm_publish_time":1543433032795,"dist-tags":{"canary":"1.1.5--canary.d9590e7.0","latest":"1.6.1"}}