{"versions":{"0.0.0-stage":{"name":"@jimp/plugin-morphology","version":"0.0.0-stage","_id":"@jimp/plugin-morphology@0.0.0-stage","stub":true,"maintainers":[{"name":"anonymous","email":"lisowski54@gmail.com"}],"dist":{"shasum":"5c7644adbf5c8ba24b23eef9cd2c0bcddcf28aa4","tarball":"http://123.232.10.234:8212/nexus/content/repositories/npm-private/@jimp/plugin-morphology/-/plugin-morphology-0.0.0-stage.tgz","fileCount":2,"integrity":"sha512-0CzmJNeUrsdsArFUgzTyYZVZGhmTToBMQbwW99xawVyWgJvKd9YcZTI0muX9rMgCzDxlh7Xf/GZVfFx4Rm1xZA==","signatures":[{"sig":"MEUCIAQ78OX1X/UMLpMlwbgW3Ovu3vhbAbvC5tgHGH+RKwFMAiEArCQmGvD4rc/whazjKFLj6dZTzkvTI6D+4QP1HQFIMVg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":345,"size":371},"_npmUser":{"name":"anonymous","email":"lisowski54@gmail.com"},"description":"Temporary package placeholder for staged publishing","directories":{},"_cnpmcore_publish_time":"2026-11-24T04:51:27.810Z","publish_time":1795495887810,"_hasShrinkwrap":false,"_source_registry_name":"default","contributors":[]},"2.0.0":{"_id":"@jimp/plugin-morphology@2.0.0","bugs":{"url":"https://github.com/jimp-dev/jimp/issues"},"dist":{"shasum":"592237db08e433dfefda56ae8421106ff75529f3","tarball":"http://123.232.10.234:8212/nexus/content/repositories/npm-private/@jimp/plugin-morphology/-/plugin-morphology-2.0.0.tgz","fileCount":13,"integrity":"sha512-mDX9uO4kQYi79+WqgVstzASH+U1wGg7NxSdfvTvDZjlvHZ6kXqDPqwmBthlkK9j1IH66IquS+hw89xICfNYQJg==","signatures":[{"sig":"MEUCIFlIN1gk9Hny6MV2sL5PjWYqKOxyXgWlnDRLaosT4jv7AiEAqbzoXCKOHIOrN69UjTiBL0uqCeDXITCPUpnCUkFXfxA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGnftOgL0Lp1CJLBBPP/TiQF42Im18gWBuhiy1TrwM5dAiAgtLar4rckGD1deG9PozI7PjtDi8uFlEHuenu/PYTQZQ=="}],"unpackedSize":63798,"size":8787},"main":"./dist/commonjs/index.js","name":"@jimp/plugin-morphology","tshy":{"exclude":["**/*.test.ts"],"exports":{".":"./src/index.ts","./package.json":"./package.json"}},"type":"module","types":"./dist/commonjs/index.d.ts","author":{"name":"Andrew Lisowski","email":"lisowski54@gmail.com"},"module":"./dist/esm/index.js","engines":{"node":">=22"},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},"./package.json":"./package.json"},"gitHead":"a0c6199088b0a3f28162a1742c9714b285dd194a","license":"MIT","scripts":{"dev":"tshy --watch","lint":"eslint .","test":"vitest","build":"tshy","clean":"rimraf node_modules .tshy .tshy-build dist .turbo","test:browser":"vitest --config vitest.config.browser.mjs"},"version":"2.0.0","_npmUser":{"name":"anonymous","email":"lisowski54@gmail.com"},"homepage":"https://github.com/jimp-dev/jimp#readme","repository":{"url":"git+https://github.com/jimp-dev/jimp.git","type":"git"},"_npmVersion":"lerna/10.1.3/node@v24.15.0+arm64 (darwin)","description":"<div align=\"center\">   <img width=\"200\" height=\"200\"     src=\"https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png\">   <h1>@jimp/plugin-morphology</h1>   <p>Erode, dilate, open and close an image.</p> </div>","directories":{},"maintainers":[{"name":"anonymous","email":"lisowski54@gmail.com"},{"name":"anonymous","email":"oliver@nth-iteration.ie"}],"sideEffects":false,"_nodeVersion":"24.15.0","dependencies":{"zod":"^4.6.7","@jimp/types":"2.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tshy":"~4.0.0","eslint":"^10.15.0","vitest":"^5.1.1","@jimp/core":"2.0.0","typescript":"^7.0.2","@jimp/js-png":"2.0.0","@jimp/js-jpeg":"2.0.0","@vitest/browser":"^5.1.1","@jimp/test-utils":"2.0.0","@jimp/config-eslint":"2.0.0","@jimp/config-vitest":"2.0.0","@jimp/config-typescript":"2.0.0","vite-plugin-node-polyfills":"^0.28.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-morphology_2.0.0_1795495984427_0.8847273618184547"},"_cnpmcore_publish_time":"2026-11-24T04:53:04.497Z","publish_time":1795495984497,"_source_registry_name":"default","contributors":[]},"2.1.0":{"_id":"@jimp/plugin-morphology@2.1.0","bugs":{"url":"https://github.com/jimp-dev/jimp/issues"},"dist":{"shasum":"47aab3de730295114c1f2863d6df9ff986a1076c","tarball":"http://123.232.10.234:8212/nexus/content/repositories/npm-private/@jimp/plugin-morphology/-/plugin-morphology-2.1.0.tgz","fileCount":13,"integrity":"sha512-lkDy5u2aXX9wIh6kD5tI7r1BfL+5dBE9SDGwifxJB+vSDOW2iAOYSlvg7xGK88+A7+Afg3DGHZ0bJy0azFwxkA==","signatures":[{"sig":"MEUCIQD83EwVay2NB8L7ihnwAe98uYeszxdVdnzeiDSwcufyGAIgBeVc45aerwDXRujtKTHCN96qs7W4Y7IZe+1vLq9CmWY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDSMvo8FJ6nldeXBX8ynm/7nXzUAqx6PuHCehOl1fHdlgIhAKWxheCTmcjXUPo+YwLbfn17dvPn8HIdCWiOcRK7E6h3"}],"unpackedSize":63789,"size":8771},"main":"./dist/commonjs/index.js","name":"@jimp/plugin-morphology","tshy":{"exclude":["**/*.test.ts"],"exports":{".":"./src/index.ts","./package.json":"./package.json"}},"type":"module","types":"./dist/commonjs/index.d.ts","author":{"name":"Andrew Lisowski","email":"lisowski54@gmail.com"},"module":"./dist/esm/index.js","engines":{"node":">=22"},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},"./package.json":"./package.json"},"gitHead":"8346e2329163e0c3ee26aaf8fe1001bac8b25a21","license":"MIT","scripts":{"dev":"tshy --watch","lint":"eslint .","test":"vitest","build":"tshy","clean":"rimraf node_modules .tshy .tshy-build dist .turbo","test:browser":"vitest --config vitest.config.browser.mjs"},"version":"2.1.0","_npmUser":{"name":"anonymous","email":"lisowski54@gmail.com"},"homepage":"https://github.com/jimp-dev/jimp#readme","repository":{"url":"git+https://github.com/jimp-dev/jimp.git","type":"git"},"_npmVersion":"lerna/10.1.3/node@v24.15.0+arm64 (darwin)","description":"<div align=\"center\">   <img width=\"140\" alt=\"\"     src=\"https://raw.githubusercontent.com/jimp-dev/jimp/main/.github/assets/jimpy.png\">   <h1>@jimp/plugin-morphology</h1>   <p>Erode, dilate, open and close an image.</p> </div>","directories":{},"maintainers":[{"name":"anonymous","email":"lisowski54@gmail.com"},{"name":"anonymous","email":"oliver@nth-iteration.ie"}],"sideEffects":false,"_nodeVersion":"24.15.0","dependencies":{"zod":"^4.6.7","@jimp/types":"2.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tshy":"~4.0.0","eslint":"^10.15.0","vitest":"^5.1.1","@jimp/core":"2.1.0","typescript":"^7.0.2","@jimp/js-png":"2.1.0","@jimp/js-jpeg":"2.1.0","@vitest/browser":"^5.1.1","@jimp/test-utils":"2.1.0","@jimp/config-eslint":"2.1.0","@jimp/config-vitest":"2.1.0","@jimp/config-typescript":"2.1.0","vite-plugin-node-polyfills":"^0.28.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-morphology_2.1.0_1795562638901_0.12831324678354372"},"_cnpmcore_publish_time":"2026-11-24T23:23:58.996Z","publish_time":1795562638996,"_source_registry_name":"default","contributors":[]},"2.2.0":{"_id":"@jimp/plugin-morphology@2.2.0","bugs":{"url":"https://github.com/jimp-dev/jimp/issues"},"dist":{"shasum":"8da0f4a233dc50c64f4a6c091547cf6fa031f732","tarball":"http://123.232.10.234:8212/nexus/content/repositories/npm-private/@jimp/plugin-morphology/-/plugin-morphology-2.2.0.tgz","fileCount":13,"integrity":"sha512-0IR8+0rzQvsOHr0RQcEVPaFkC2EnjrczRL5nZN7toXUd9p/tQz7YL4gD/3N+lGdiS0RUBL+Vx8eSdi/QDTkhmg==","signatures":[{"sig":"MEUCIQCXMn4MFLTmmKiFdy+mP5zJcecAzpBWUv7vY9vVau3pBwIgGlpC9/QocCmEsLVzURRteHAibv20zVuZuolNqdX1fDQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICFPJZLD7aLbZscNTP5FcEgdR0kppURb53bWpVPxnIngAiBvlpDsjfGh0V7puvu7/vEPK3oI5UCxK5W58Lm7pnu0hw=="}],"unpackedSize":63789,"size":8771},"main":"./dist/commonjs/index.js","name":"@jimp/plugin-morphology","tshy":{"exclude":["**/*.test.ts"],"exports":{".":"./src/index.ts","./package.json":"./package.json"}},"type":"module","types":"./dist/commonjs/index.d.ts","author":{"name":"Andrew Lisowski","email":"lisowski54@gmail.com"},"module":"./dist/esm/index.js","engines":{"node":">=22"},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},"./package.json":"./package.json"},"gitHead":"3308bdef5bcf1a8ef868bd3a5abf5105c993e060","license":"MIT","scripts":{"dev":"tshy --watch","lint":"eslint .","test":"vitest","build":"tshy","clean":"rimraf node_modules .tshy .tshy-build dist .turbo","test:browser":"vitest --config vitest.config.browser.mjs"},"version":"2.2.0","_npmUser":{"name":"anonymous","email":"lisowski54@gmail.com"},"homepage":"https://github.com/jimp-dev/jimp#readme","repository":{"url":"git+https://github.com/jimp-dev/jimp.git","type":"git"},"_npmVersion":"lerna/10.1.3/node@v24.15.0+arm64 (darwin)","description":"<div align=\"center\">   <img width=\"140\" alt=\"\"     src=\"https://raw.githubusercontent.com/jimp-dev/jimp/main/.github/assets/jimpy.png\">   <h1>@jimp/plugin-morphology</h1>   <p>Erode, dilate, open and close an image.</p> </div>","directories":{},"maintainers":[{"name":"anonymous","email":"lisowski54@gmail.com"},{"name":"anonymous","email":"oliver@nth-iteration.ie"}],"sideEffects":false,"_nodeVersion":"24.15.0","dependencies":{"zod":"^4.6.7","@jimp/types":"2.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tshy":"~4.0.0","eslint":"^10.15.0","vitest":"^5.1.1","@jimp/core":"2.2.0","typescript":"^7.0.2","@jimp/js-png":"2.2.0","@jimp/js-jpeg":"2.2.0","@vitest/browser":"^5.1.1","@jimp/test-utils":"2.2.0","@jimp/config-eslint":"2.2.0","@jimp/config-vitest":"2.2.0","@jimp/config-typescript":"2.2.0","vite-plugin-node-polyfills":"^0.28.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-morphology_2.2.0_1795629185788_0.663960487419473"},"_cnpmcore_publish_time":"2026-11-25T17:53:05.879Z","publish_time":1795629185879,"_source_registry_name":"default","contributors":[]},"2.2.1":{"_id":"@jimp/plugin-morphology@2.2.1","bugs":{"url":"https://github.com/jimp-dev/jimp/issues"},"dist":{"shasum":"050644b776f5ee521c57b9a16624f895fb398f99","tarball":"http://123.232.10.234:8212/nexus/content/repositories/npm-private/@jimp/plugin-morphology/-/plugin-morphology-2.2.1.tgz","fileCount":13,"integrity":"sha512-C2rznfELmeqiyD9yKL8H+obRszZu1EezsUTlQSMMj0zEohxpGVWnFsl1KO9eg4LuiDqGbJ5hNseXmKSZ0ZgWQA==","signatures":[{"sig":"MEYCIQD6+9h5Ho6ZFDaiF4vDFZhgNRd5aRDGV9LXXXQdtDc5UAIhALZS5krKuXrzQVkoD/tKoJvX8RZsrsspdqbTY8quJvTj","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCr4V10WXYPNyiDugpUpCmihVS0NvaBwrrzop6Em1kceQIhAMAzJavIF1cqv2p3RQ+BYUTaAzSdYx49HXfMC+DXjYcu"}],"unpackedSize":63789,"size":8774},"main":"./dist/commonjs/index.js","name":"@jimp/plugin-morphology","tshy":{"exclude":["**/*.test.ts"],"exports":{".":"./src/index.ts","./package.json":"./package.json"}},"type":"module","types":"./dist/commonjs/index.d.ts","author":{"name":"Andrew Lisowski","email":"lisowski54@gmail.com"},"module":"./dist/esm/index.js","engines":{"node":">=22"},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},"./package.json":"./package.json"},"gitHead":"7ab3ff96f32a76e547be763bbafd474226429103","license":"MIT","scripts":{"dev":"tshy --watch","lint":"eslint .","test":"vitest","build":"tshy","clean":"rimraf node_modules .tshy .tshy-build dist .turbo","test:browser":"vitest --config vitest.config.browser.mjs"},"version":"2.2.1","_npmUser":{"name":"anonymous","email":"lisowski54@gmail.com"},"homepage":"https://github.com/jimp-dev/jimp#readme","repository":{"url":"git+https://github.com/jimp-dev/jimp.git","type":"git"},"_npmVersion":"lerna/10.1.3/node@v24.15.0+arm64 (darwin)","description":"<div align=\"center\">   <img width=\"140\" alt=\"\"     src=\"https://raw.githubusercontent.com/jimp-dev/jimp/main/.github/assets/jimpy.png\">   <h1>@jimp/plugin-morphology</h1>   <p>Erode, dilate, open and close an image.</p> </div>","directories":{},"maintainers":[{"name":"anonymous","email":"lisowski54@gmail.com"},{"name":"anonymous","email":"oliver@nth-iteration.ie"}],"sideEffects":false,"_nodeVersion":"24.15.0","dependencies":{"zod":"^4.6.7","@jimp/types":"2.2.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tshy":"~4.0.0","eslint":"^10.15.0","vitest":"^5.1.1","@jimp/core":"2.2.1","typescript":"^7.0.2","@jimp/js-png":"2.2.1","@jimp/js-jpeg":"2.2.1","@vitest/browser":"^5.1.1","@jimp/test-utils":"2.2.1","@jimp/config-eslint":"2.2.1","@jimp/config-vitest":"2.2.1","@jimp/config-typescript":"2.2.1","vite-plugin-node-polyfills":"^0.28.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-morphology_2.2.1_1795814485637_0.034858775365172234"},"_cnpmcore_publish_time":"2026-11-27T21:21:25.740Z","publish_time":1795814485740,"_source_registry_name":"default","contributors":[]},"2.2.2":{"_id":"@jimp/plugin-morphology@2.2.2","bugs":{"url":"https://github.com/jimp-dev/jimp/issues"},"dist":{"shasum":"dc3876eb13e7c7ca987a2cc264d020439c046d7d","tarball":"http://123.232.10.234:8212/nexus/content/repositories/npm-private/@jimp/plugin-morphology/-/plugin-morphology-2.2.2.tgz","fileCount":13,"integrity":"sha512-xgSVPBUzD2zwlntgWHGPJUxXCmFbVxgoDMrCHQgVCVxvUwTpXC70vZmCmsbEt7Jdi1r5Pthjxvdf5ckTZvphSA==","signatures":[{"sig":"MEUCICpsTBUux6ocUDDHaw6+tafCA0n9VjxUCwGe7sC/MfLTAiEAvjaq95AzGDbjTe6HdNn+aAe7NTLHmv5AOHnri0z7Cbg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBVfFxbOCqVDv/yWDw/BYDLgpNmE961aeSJYgrb00J18AiBFN9gXCgrRBgMpbb74R0nNG0/Jwl6m2jAap8YA7W+FpA=="}],"unpackedSize":63789,"size":8773},"main":"./dist/commonjs/index.js","name":"@jimp/plugin-morphology","tshy":{"exclude":["**/*.test.ts"],"exports":{".":"./src/index.ts","./package.json":"./package.json"}},"type":"module","types":"./dist/commonjs/index.d.ts","author":{"name":"Andrew Lisowski","email":"lisowski54@gmail.com"},"module":"./dist/esm/index.js","engines":{"node":">=22"},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},"./package.json":"./package.json"},"gitHead":"d18cc93e6e0d1765ca72b19c22f2aa94dc183981","license":"MIT","scripts":{"dev":"tshy --watch","lint":"eslint .","test":"vitest","build":"tshy","clean":"rimraf node_modules .tshy .tshy-build dist .turbo","test:browser":"vitest --config vitest.config.browser.mjs"},"version":"2.2.2","_npmUser":{"name":"anonymous","email":"lisowski54@gmail.com"},"homepage":"https://github.com/jimp-dev/jimp#readme","repository":{"url":"git+https://github.com/jimp-dev/jimp.git","type":"git"},"_npmVersion":"lerna/10.1.3/node@v24.15.0+arm64 (darwin)","description":"<div align=\"center\">   <img width=\"140\" alt=\"\"     src=\"https://raw.githubusercontent.com/jimp-dev/jimp/main/.github/assets/jimpy.png\">   <h1>@jimp/plugin-morphology</h1>   <p>Erode, dilate, open and close an image.</p> </div>","directories":{},"maintainers":[{"name":"anonymous","email":"lisowski54@gmail.com"},{"name":"anonymous","email":"oliver@nth-iteration.ie"}],"sideEffects":false,"_nodeVersion":"24.15.0","dependencies":{"zod":"^4.6.7","@jimp/types":"2.2.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tshy":"~4.0.0","eslint":"^10.15.0","vitest":"^5.1.1","@jimp/core":"2.2.2","typescript":"^7.0.2","@jimp/js-png":"2.2.2","@jimp/js-jpeg":"2.2.2","@vitest/browser":"^5.1.1","@jimp/test-utils":"2.2.2","@jimp/config-eslint":"2.2.2","@jimp/config-vitest":"2.2.2","@jimp/config-typescript":"2.2.2","vite-plugin-node-polyfills":"^0.28.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-morphology_2.2.2_1796011988994_0.8922915083360342"},"_cnpmcore_publish_time":"2026-11-30T04:13:09.073Z","publish_time":1796011989073,"_source_registry_name":"default","contributors":[]}},"dist-tags":{"latest":"2.2.2"},"name":"@jimp/plugin-morphology","time":{"created":"2026-11-24T13:32:38.302Z","modified":"2026-11-30T04:13:25.068Z","0.0.0-stage":"2026-11-24T04:51:27.810Z","2.0.0":"2026-11-24T04:53:04.497Z","2.1.0":"2026-11-24T23:23:58.996Z","2.2.0":"2026-11-25T17:53:05.879Z","2.2.1":"2026-11-27T21:21:25.740Z","2.2.2":"2026-11-30T04:13:09.073Z"},"readme":"<div align=\"center\">\n  <img width=\"140\" alt=\"\"\n    src=\"https://raw.githubusercontent.com/jimp-dev/jimp/main/.github/assets/jimpy.png\">\n  <h1>@jimp/plugin-morphology</h1>\n  <p>Erode, dilate, open and close an image.</p>\n</div>\n\nMorphological operations, useful for cleaning up scans, masks and thresholded\nimages: removing specks, filling small holes, and thickening or thinning\nlines.\n\n- [erode](https://jimp-dev.github.io/jimp/api/jimp/classes/jimp/#erode)\n- [dilate](https://jimp-dev.github.io/jimp/api/jimp/classes/jimp/#dilate)\n- [open](https://jimp-dev.github.io/jimp/api/jimp/classes/jimp/#open)\n- [close](https://jimp-dev.github.io/jimp/api/jimp/classes/jimp/#close)\n\n## Usage\n\n```ts\nimport { Jimp } from \"jimp\";\n\nconst image = await Jimp.read(\"scan.png\");\n\n// Each pixel becomes the darkest pixel within 2 pixels of it\nimage.erode({ radius: 2 });\n\n// Each pixel becomes the brightest pixel within 3 pixels of it\nimage.dilate({ radius: 3, shape: \"disk\" });\n\n// Remove bright specks smaller than the neighbourhood\nimage.open({ radius: 1 });\n\n// Fill dark holes smaller than the neighbourhood\nimage.close({ radius: 1 });\n```\n\n| Method   | Does              | Effect                                                    |\n| -------- | ----------------- | --------------------------------------------------------- |\n| `erode`  | min of neighbours | Dark areas grow, bright details thinner than it disappear |\n| `dilate` | max of neighbours | Bright areas grow, dark details thinner than it disappear |\n| `open`   | `erode`, `dilate` | Removes bright specks, keeps larger bright shapes' size   |\n| `close`  | `dilate`, `erode` | Fills dark holes and gaps, keeps larger shapes' size      |\n\nBright grows with `dilate`. For dark ink on a white page, `erode` thickens\nthe ink and `dilate` thins it, `close` removes dark specks, and `open` fills\ngaps in the ink.\n\n### Options\n\n- `radius`: how far the neighbourhood reaches from each pixel, in pixels.\n  It's rounded to a whole number, and 0 or less leaves the image unchanged.\n- `shape`: `\"square\"` (default) is the (2 × radius + 1) square around the\n  pixel. `\"disk\"` is the pixels within `radius` of it, which gives rounder\n  results.\n\n### How it works\n\n- Each channel, alpha included, is processed on its own, like OpenCV's\n  `erode` and `dilate` on a color image. On a greyscale or black and white\n  image this is the usual morphology. On a color image the result can mix\n  channels from different neighbours. On an image with transparency, opaque\n  shapes grow with `dilate` and shrink with `erode`.\n- The neighbourhood is clipped to the image: pixels near an edge only look at\n  the pixels inside it, and never wrap around to the other side.\n- A square costs the same for any radius. A disk costs more as the radius\n  grows, so prefer a square for large radii.\n\nSee [Getting Started](https://jimp-dev.github.io/jimp/guides/getting-started/) to read an image, change it and save the result with `write` or `getBuffer`.","users":{}}