made a few changes

This commit is contained in:
plane000
2018-07-07 15:31:13 +01:00
parent 798c71ee0e
commit 1c2adf84c7
4 changed files with 3 additions and 5 deletions

View File

@@ -36,14 +36,12 @@ function getFaces(usernames) {
let link = JSON.parse(Buffer.from(res.properties[0].value, 'base64').toString('ascii')).textures.SKIN.url;
jimp.read(link, function (err, lenna) {
if (err) throw err;
lenna.crop(8,8,8,8)
.resize(256, 256, jimp.RESIZE_NEAREST_NEIGHBOR)
lenna.crop(8,8,8,8)
.resize(256, jimp.AUTO, jimp.RESIZE_NEAREST_NEIGHBOR)
.write(`images/${username}.png`);
console.log(`${username}'s skin cropped successfully`);
});
});
}).on("error", (err) => {
console.log(`ERROR: Couldn't get ${username}'s skin!`);
});