Skip to content

hadiazt/effects-image.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

effects-image.js

🎨 A nice and easy to use module to add effects to your images


⚡️ Available filters

blur brightness circle fhisheye flip
greyscale invert normalize rotate

See examples for more help


Add a blur filter to an image ? It's possible and easy !

const { Blur } = require('effects-image.js');

new Blur()
    .setImage('./img.png')
    .setLevel(5)
    .write('./new.png')
    .build().then(console.log('Saved'))

new Blur({
    image: './img.png',
    level: 5,
    file: './new.png'
}).build().then(console.log('Saved'))

Simple Discord example (discord.js v13)

const { Blur } = require('effects-image.js');
const { Client, Intents } = require('discord.js');

const client = new Client({
    intents: [
        Intents.FLAGS.GUILDS,
        Intents.FLAGS.GUILD_MESSAGES
    ]
});

client.on('messageCreate', (message) => {
    if (message.author.bot) return;

    new Blur()
        .setImage('./img.png')
        .setLevel(5)
        .build().then(res => {
            message.channel.send({
                content: 'Hello world', files: [
                    { attachment: res }
                ]
            })
        })
});

client.login('');

This is an fork of ZerioDev source.

Releases

No releases published

Packages

No packages published