Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
async function addMustache(url, output) {
let source = await Jimp.read(url);
// Lấy chiều cao, rộng của ảnh
const { height, width } = source.bitmap;
const mustache = await Jimp.read('mustache.png');
// Thu nhỏ bộ râu lại
mustache.resize(width, Jimp.AUTO);
return source.composite(mustache, 0, 0).write(output);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.