{"name":"@jimp/plugin-crop","version":"0.22.5","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.5"},"devDependencies":{"@jimp/custom":"^0.22.5","@jimp/test-utils":"^0.22.5"},"peerDependencies":{"@jimp/custom":">=0.3.5"},"publishConfig":{"access":"public"},"gitHead":"8360424c88fff7aeef4c22f68f797c138e440274","bugs":{"url":"https://github.com/jimp-dev/jimp/issues"},"homepage":"https://github.com/jimp-dev/jimp#readme","_id":"@jimp/plugin-crop@0.22.5","_nodeVersion":"16.18.1","_npmVersion":"lerna/3.16.4/node@v16.18.1+x64 (linux)","dist":{"integrity":"sha512-90I7+z7A7P/rsnG5HeAUIBmEhT452GY99NblCk/YrMIIdrt+Y2KRNoF0z3wuY8pxxCKXklSTeh7LBRizczyNIQ==","shasum":"b89d3d1595a1fbbe8f5f232b360cbaaa384f0d58","tarball":"http://registry-npm.ywwl.com/@jimp/plugin-crop/download/@jimp/plugin-crop-0.22.5.tgz","fileCount":12,"unpackedSize":88679,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCrccpZJIqrdoPsJteJBu0bvsKz0kviPN3qtQMwdAAEmgIhAMHkyDbGVtyz6x/YPukfHXJpuzfiO1ci+BB+JRvh8T6j"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj9QBlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr6Iw//d3dSB2rw5Pv3bz7YEA4z4Lk9Hsk/DUIagXx5TICsgLTM2ykZ\r\nAxm7uxo0pJXBvE7SGUrKwkTK2iXNDM0kEKqQw3i7aLQHxWsuVflAWmMvobSt\r\n2xakAFNUJgowBwFnjxMYzPCNRJvUIAfwUlH0Cf8X6LqeFXAY1NbBcmTbkj6Y\r\ne94LygKDJPKY94fGH42ZSJFFHiF2vrLKRU0eCtEadGCVWGxqBHBk5O3xOdXL\r\n7DsEqeeiyNtUctD2PcLPBe78p/KAmw1h4YyPTSXyYooylITEy2DITjEfSxPV\r\ngegXF97prfK7ziOoU28jGuFNvP+NhklaAqE3fojx/v3IRNO0NM0adH8Jm+g5\r\n4rFi3v5Uhkyjuf/07MUQeVj1l0WyKi2LqSAnjYF+GzLF4r0RkZxlJiHwvuKv\r\nTkkYsEbvL6zfLnwh2Aug3n2FFLPDsUDdi4j2zVYwOqfTd27uF9+Vk9nnCMkO\r\n/C0kwdqxxZsldMcRX6pVpjbE+CHbbefukmANQAML8Rpg7Z+vCxaSC8ZO8Yuh\r\neZFhON2wDXJz6NkUvHlx6zNxw+HszfJ8IRAonqiZvMs1VUceUxtfBMv6pnJd\r\nkeZGzuaMCiLREjhOISeXmAvZT/ZgHdtc4YvET8WmsqxID57udSorUtqF+foB\r\n1H8oCXvkKjvvI4hwQ7c1ehKuISsGn/Wvahk=\r\n=ikh5\r\n-----END PGP SIGNATURE-----\r\n","size":11009,"noattachment":false,"key":"/@jimp/plugin-crop/-/@jimp/plugin-crop-0.22.5.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.5_1677000805446_0.4392574724019038"},"_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":1677000805702,"_cnpm_publish_time":1677000805702,"dist-tags":{"canary":"1.1.5--canary.d9590e7.0","latest":"1.6.1"}}