|
3 周之前 | |
---|---|---|
.. | ||
es | 3 周之前 | |
src | 3 周之前 | |
test | 3 周之前 | |
CHANGELOG.md | 3 周之前 | |
LICENSE | 3 周之前 | |
README.md | 3 周之前 | |
babel.config.js | 3 周之前 | |
index.d.ts | 3 周之前 | |
package.json | 3 周之前 |
This is useful as a simplified method for processing scanned drawings, signatures, etc
@param {function(Error, Jimp)} cb (optional) a callback for when complete
import jimp from 'jimp';
async function main() {
const image = await jimp.read('test/image.png');
image.threshold({ max: 150 });
// or
image.threshold({ max: 200, replace: 200, autoGreyscale: false });
}
main();