beautiful-pictures
v0.0.2
Published
A simple module to edit your photos (uses jimp).
Downloads
2
Maintainers
Readme
A simple module to edit your photos (uses jimp).
🏓 Installation
npm i beautiful-pictures
✨ Utilisation
Structure :
#Read an image
<module>.readPicture({ width: 'XXX', height: 'XXX', content: 'XXX' })
#Add an effect on an image
<module>.drawPicture({ width: 'XXX', height: 'XXX', effect: 'XXX', content: 'XXX' })
To read an image (with discord.js) :
client.on("message", async (message) => {
if (message.content === "!read") {
let img = await picture.readPicture({ width: 480, height: 480, content: 'URL or image file' });
let attachment = new Discord.MessageAttachment(img, "image.png");
message.channel.send(attachment);
}
})
To add an effect on an image (with discord.js) :
client.on("message", async (message) => {
if (message.content === "!effect") {
//List of available effects : (blur, sepia, greyscale, convolute, pixel, invert, circle, contrast)
//Example with the blur effect :
let img = await picture.drawPicture({ width: 480, height: 480, effect: 'blur', content: 'URL or image file' });
let attachment = new Discord.MessageAttachment(img, "image.png");
message.channel.send(attachment);
}
})
🤝 Contributing
Contributions, issues and feature requests are welcome !Feel free to check issues page.
Don't forget to support the project by adding a star to the Github !