{"name":"@jimp/plugin-crop","version":"0.22.10","description":"crop an image.","main":"dist/index.js","module":"es/index.js","repository":{"type":"git","url":"git+https://github.com/jimp-dev/jimp.git"},"types":"index.d.ts","scripts":{"test":"cross-env BABEL_ENV=test mocha --require @babel/register --recursive test  --extension js","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.22.10"},"devDependencies":{"@jimp/custom":"^0.22.10","@jimp/test-utils":"^0.22.10"},"peerDependencies":{"@jimp/custom":">=0.3.5"},"publishConfig":{"access":"public"},"gitHead":"af334eff862cc8091378cd6b1e194086e36d445e","bugs":{"url":"https://github.com/jimp-dev/jimp/issues"},"homepage":"https://github.com/jimp-dev/jimp#readme","_id":"@jimp/plugin-crop@0.22.10","_nodeVersion":"16.18.1","_npmVersion":"lerna/3.16.4/node@v16.18.1+x64 (linux)","dist":{"integrity":"sha512-BOZ+YGaZlhU7c5ye65RxikicXH0Ki0It6/XHISvipR5WZrfjLjL2Ke20G+AGnwBQc76gKenVcMXVUCnEjtZV+Q==","shasum":"6204fd6be751d7edb64a86ab788ba762843b9877","tarball":"http://registry-npm.ywwl.com/@jimp/plugin-crop/download/@jimp/plugin-crop-0.22.10.tgz","fileCount":12,"unpackedSize":89142,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCy2JJ6Ob8QWt0oSLAfR49gLFOyy4O4N/8MyiLxppOMgIgREkCvPB3e9YH+igRDQGdt4qO8bVmmD0lYskFcvgsfK4="}],"size":11146,"noattachment":false,"key":"/@jimp/plugin-crop/-/@jimp/plugin-crop-0.22.10.tgz"},"_npmUser":{"name":"alisowski","email":"lisowski54@gmail.com"},"directories":{},"maintainers":[{"name":"alisowski","email":"lisowski54@gmail.com"},{"name":"oliver.moran","email":"oliver@nth-iteration.ie"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-crop_0.22.10_1690398331531_0.7621732326891895"},"_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":1690398331732,"_cnpm_publish_time":1690398331732,"dist-tags":{"canary":"1.1.5--canary.d9590e7.0","latest":"1.6.1"}}