Multithreading Image Processor (MIP) is a project aimed at developing a fast and highly customizable image processing system using the Dart programming language's dart:io, dart:isolate, and image package, as well as the nyxx package for Discord bots.
Without filter | P&B filter | Inverted filter |
---|---|---|
Billboard filter | Sepia filter | Bulge filter |
---|---|---|
Vignette filter | Gaussian filter | Emboss filter |
---|---|---|
Sobel filter |
---|
You can combine the filters and use flags, such as: "&make bulge -x 20 -y 30 -radius 160 image <link here>"
The goal of this project is to provide a bot-based interface for users to submit image processing requests, which are then completed and returned with the specified filters applied.
The command system for MIP is highly versatile, with new options and flags being added regularly. Some of the current available commands include:
&make <link> parameters (the link can be added anywhere in the command)
p&b: Apply a black and white filter to the image
inverted: Apply an inverted color filter to the image
billboard: Apply a billboard (the image is made up of dots) filter to the image
sepia: Apply a sepia (shades of yellow) filter to the image
bulge: Apply a bulge effect to the image (try it, it's funny!)
vignette: Apply a vignette to the image (you can add a custom value, like "with vignette 0.8")
gaussian: Apply a blur effect to the image [-blur]
emboss: Apply a emboss convolution filter to the given image
sobel: Apply a sobel edge detection filter to the given image
gif: performs a search for 10 gifs according to the search term, stores it in a list and returns a random GIF from the list.
x sets the X position of the distortion to be generated in the image.
y sets the Y position of the distortion to be generated in the image.
radius sets the size of the radius of the distortion to be generated in the image.
"&make bulge -x 10 -y -4 -radius 160 <link>"
If you write vignette with a (-), you'll be able to control the weight of the vignette.
"&make -vignette 1.4 <link>"
The gaussian filter has the flag "-blur" to control the blur of the filter.
"&make gaussian -blur 6 <link>"
First, run the install.sh
Then edit the file named config.dart
inside the lib/config/
folder:
class Config {
static const String _discordToken =
"<TOKEN>";
static const String _giphyToken = '<TOKEN>';
static String getDiscordToken() {
return _discordToken;
}
static String getGiphyToken() {
return _giphyToken;
}
}
List textList = [
'Put some answers inside this list',
'These are the responses',
'for when someone tags the bot',
'and types something after the @',
'example: "@MIP I hate you"',
];
String randomText() {
var randomItem = (textList..shuffle()).first;
return randomItem.toString();
}