Canvacard
Classes
Functions
trigger(image) ⇒ Promise.<Buffer>
Trigger an image
invert(image) ⇒ Promise.<Buffer>
Invert an image
sepia(image) ⇒ Promise.<Buffer>
Sepia an image
greyscale(image) ⇒ Promise.<Buffer>
Greyscale an image
brightness(image, amount) ⇒ Promise.<Buffer>
Edit the brightness of the image
darkness(image, amount) ⇒ Promise.<Buffer>
Darken an image
threshold(image, amount) ⇒ Promise.<Buffer>
convolute(image, matrix, opaque) ⇒ Promise.<Buffer>
Convolute an image
pixelate(image, pixels) ⇒ Promise.<Buffer>
Pixelate an image
sharpen(image, lvl) ⇒ Promise.<Buffer>
Sharpen an image
burn(image, lvl) ⇒ Promise.<Buffer>
Burn an image
circle(image) ⇒ Promise.<Buffer>
Circle an image
fuse(image1, image2) ⇒ Promise.<Buffer>
Fuse two images
resize(image, width, height) ⇒ Promise.<Buffer>
Resize an image
kiss(image1, image2) ⇒ Promise.<Buffer>
Kiss someone ( ͡° ͜ʖ ͡°)
spank(image1, image2) ⇒ Promise.<Buffer>
To spank someone ( ͡° ͜ʖ ͡°)
slap(image1, image2) ⇒ Promise.<Buffer>
Slap someone ( ͡° ͜ʖ ͡°)
facepalm(image) ⇒ Promise.<Buffer>
Facepalm someone
colorfy(image, color) ⇒ Promise.<Buffer>
Colorfy an image
distracted(image1, image2, image3) ⇒ Promise.<Buffer>
Distract someone
jail(image, greyscale) ⇒ Promise.<Buffer>
Create a jail image
bed(image1, image2) ⇒ Promise.<Buffer>
Create a bed image
delete(image, dark) ⇒ Promise.<Buffer>
Create a deleted image
gradient(colorFrom, colorTo, width, height) ⇒ Promise.<Buffer>
Create a gradient image
quote(options, [font]) ⇒ Promise.<Buffer>
Create a fake quote image
phub(options, [font]) ⇒ Promise.<Buffer>
PornHub Comment
wanted(image) ⇒ Promise.<Buffer>
Create a "wanted" image
wasted(image) ⇒ Promise.<Buffer>
Create a "wasted" image
youtube(ops) ⇒ Promise.<Buffer>
Create a YouTube comment image
write(data, name) ⇒ void
Writes data as a file
reply(options) ⇒ Promise.<Buffer>
Discord Reply Clone
Canvacard
Kind: global class
new Canvacard()
Image generator
Example
trigger(image) ⇒ Promise.<Buffer>
Promise.<Buffer>
Trigger an image
Kind: global function
Returns: Promise.<Buffer>
- Triggered image
Throws:
APIError
If image is not provided
image
string
| Buffer
Image to trigger
Example
invert(image) ⇒ Promise.<Buffer>
Promise.<Buffer>
Invert an image
Kind: global function
Returns: Promise.<Buffer>
- Inverted image
Throws:
APIError
If image is not provided
image
string
| Buffer
Image to invert
Example
sepia(image) ⇒ Promise.<Buffer>
Promise.<Buffer>
Sepia an image
Kind: global function
Returns: Promise.<Buffer>
- Sepia image
Throws:
APIError
If image is not provided
image
string
| Buffer
Image to sepia
Example
greyscale(image) ⇒ Promise.<Buffer>
Promise.<Buffer>
Greyscale an image
Kind: global function
Returns: Promise.<Buffer>
- Greyscale image
Throws:
APIError
If image is not provided
image
string
| Buffer
Image to greyscale
Example
brightness(image, amount) ⇒ Promise.<Buffer>
Promise.<Buffer>
Edit the brightness of the image
Kind: global function
Returns: Promise.<Buffer>
- Brightened image
Throws:
APIError
If image is not provided o la cantidad no es un número
image
string
| Buffer
Image to brighten
amount
number
Amount of brightness
Example
darkness(image, amount) ⇒ Promise.<Buffer>
Promise.<Buffer>
Darken an image
Kind: global function
Returns: Promise.<Buffer>
- Darkened image
Throws:
APIError
If image is not provided o la cantidad no es un número
image
string
| Buffer
Image to darken
amount
number
Amount of darkness
Example
threshold(image, amount) ⇒ Promise.<Buffer>
Promise.<Buffer>
Kind: global function
Returns: Promise.<Buffer>
- Thresholded image
Throws:
APIError
If image is not provided o la cantidad no es un número
Descrioption: Threshold an image
image
string
| Buffer
Image to threshold
amount
number
Amount of threshold
Example
convolute(image, matrix, opaque) ⇒ Promise.<Buffer>
Promise.<Buffer>
Convolute an image
Kind: global function
Returns: Promise.<Buffer>
- Convoluted image
Throws:
APIError
If image is not provided o la matriz no es un Array
image
string
| Buffer
Image to convolute
matrix
Array.<number>
Convolution matrix
opaque
boolean
If the image should be opaque
Example
pixelate(image, pixels) ⇒ Promise.<Buffer>
Promise.<Buffer>
Pixelate an image
Kind: global function
Returns: Promise.<Buffer>
- Pixelated image
Throws:
APIError
If image is not provided o los píxeles no son un número
image
string
| Buffer
Image to pixelate
pixels
number
Amount of pixels
Example
burn(image, lvl) ⇒ Promise.<Buffer>
Promise.<Buffer>
Burn an image
Kind: global function
Returns: Promise.<Buffer>
- Burned image
Throws:
APIError
If image is not provided o el nivel no es un número
image
string
| Buffer
Image to burn
lvl
number
Level of burning
Example
circle(image) ⇒ Promise.<Buffer>
Promise.<Buffer>
Circle an image
Kind: global function
Returns: Promise.<Buffer>
- Circled image
Throws:
APIError
If image is not provided
image
string
| Buffer
Image to circle
Example
fuse(image1, image2) ⇒ Promise.<Buffer>
Promise.<Buffer>
Fuse two images
Kind: global function
Returns: Promise.<Buffer>
- Fused image
Throws:
APIError
If image is not provided
image1
string
| Buffer
First image
image2
string
| Buffer
Second image
Example
resize(image, width, height) ⇒ Promise.<Buffer>
Promise.<Buffer>
Resize an image
Kind: global function
Returns: Promise.<Buffer>
- Resized image
Throws:
APIError
If image is not provided
image
string
| Buffer
Image to resize
width
number
Width
height
number
Height
Example
kiss(image1, image2) ⇒ Promise.<Buffer>
Promise.<Buffer>
Kiss someone ( ͡° ͜ʖ ͡°)
Kind: global function
Returns: Promise.<Buffer>
- Imagen de beso
Throws:
APIError
If image is not provided
image1
string
| Buffer
First image
image2
string
| Buffer
Second image
Example
spank(image1, image2) ⇒ Promise.<Buffer>
Promise.<Buffer>
To spank someone ( ͡° ͜ʖ ͡°)
Kind: global function
Returns: Promise.<Buffer>
- Image of spank
Throws:
APIError
If image is not provided
image1
string
| Buffer
First image
image2
string
| Buffer
Second image
Example
slap(image1, image2) ⇒ Promise.<Buffer>
Promise.<Buffer>
Slap someone ( ͡° ͜ʖ ͡°)
Kind: global function
Returns: Promise.<Buffer>
- Image of slap
Throws:
APIError
If image is not provided
image1
string
| Buffer
First image
image2
string
| Buffer
Second image
Example
facepalm(image) ⇒ Promise.<Buffer>
Promise.<Buffer>
Facepalm someone
Kind: global function
Returns: Promise.<Buffer>
- Image of facepalm
Throws:
APIError
If image is not provided
image
string
| Buffer
Image to facepalm
Example
colorfy(image, color) ⇒ Promise.<Buffer>
Promise.<Buffer>
Colorfy an image
Kind: global function
Returns: Promise.<Buffer>
- Colorfied image
Throws:
APIError
If image is not provided
image
string
| Buffer
Image to colorfy
color
string
Color to apply to the image (hex)
Example
distracted(image1, image2, image3) ⇒ Promise.<Buffer>
Promise.<Buffer>
Distract someone
Kind: global function
Returns: Promise.<Buffer>
- Distracted image
Throws:
APIError
If image is not provided
image1
string
| Buffer
Face for the girl in red.
image2
string
| Buffer
Face for the boy.
image3
string
| Buffer
Face for the other girl [optional]
Example
jail(image, greyscale) ⇒ Promise.<Buffer>
Promise.<Buffer>
Create a jail image
Kind: global function
Returns: Promise.<Buffer>
- Jailed image
Throws:
APIError
If image is not provided
image
string
| Buffer
Image to jail
greyscale
boolean
If the image should be greyscale
Example
bed(image1, image2) ⇒ Promise.<Buffer>
Promise.<Buffer>
Create a bed image
Kind: global function
Returns: Promise.<Buffer>
- Imagen de cama
Throws:
APIError
If image is not provided
image1
string
| Buffer
First image
image2
string
| Buffer
Second image
Example
delete(image, dark) ⇒ Promise.<Buffer>
Promise.<Buffer>
Create a deleted image
Kind: global function
Returns: Promise.<Buffer>
- Deleted image
Throws:
APIError
If image is not provided
image
string
| Buffer
Image to delete
dark
boolean
If the image should be dark
Example
gradient(colorFrom, colorTo, width, height) ⇒ Promise.<Buffer>
Promise.<Buffer>
Create a gradient image
Kind: global function
Returns: Promise.<Buffer>
- Gradient image
Throws:
APIError
If colorFrom or colorTo is not provided
colorFrom
string
First color
colorTo
string
Second color
width
number
Width of image
height
number
Height of image
Example
quote(options, [font]) ⇒ Promise.<Buffer>
Promise.<Buffer>
Create a fake quote image
Kind: global function
Returns: Promise.<Buffer>
- Quote image
options
object
Options
[options.image]
Buffer
| string
Image
[options.message]
string
Message
[options.username]
string
Username
[options.color]
string
Color
[font]
string
""Arial""
Text font for the card
Example
phub(options, [font]) ⇒ Promise.<Buffer>
Promise.<Buffer>
PornHub Comment
Kind: global function
Returns: Promise.<Buffer>
- PornHub Comment image
Throws:
APIError
If username, message or image is not provided
options
Object
Options
[options.username]
String
Username
[options.message]
String
Message
[options.image]
String
| Buffer
Image
[font]
string
""Arial""
Text font for card
Example
wanted(image) ⇒ Promise.<Buffer>
Promise.<Buffer>
Create a "wanted" image
Kind: global function
Returns: Promise.<Buffer>
- Wanted image
Throws:
APIError
If image is not provided
image
string
| Buffer
Image to wanted
Example
wasted(image) ⇒ Promise.<Buffer>
Promise.<Buffer>
Create a "wasted" image
Kind: global function
Returns: Promise.<Buffer>
- Wasted image
Throws:
APIError
If image is not provided
image
string
| Buffer
Image to wasted
Example
youtube(ops) ⇒ Promise.<Buffer>
Promise.<Buffer>
Create a YouTube comment image
Kind: global function
Returns: Promise.<Buffer>
- YouTube comment image
Throws:
APIError
If username, content or avatar is not provided
ops
object
Options
[ops.username]
string
Username
[ops.content]
string
Content
[ops.avatar]
string
| Buffer
Avatar
[ops.dark]
boolean
false
Dark mode
Example
write(data, name) ⇒ void
void
Writes data as a file
Kind: global function
data
Buffer
data to write
name
string
file name
reply(options) ⇒ Promise.<Buffer>
Promise.<Buffer>
Discord Reply Clone
Kind: global function
Returns: Promise.<Buffer>
- Reply image
Throws:
APIError
If the avatar, username or message is not provided
options
object
Options
[options.avatar1]
string
| Buffer
Avatar of the person who responded
[options.avatar2]
string
| Buffer
Avatar of the other person
[options.user1]
string
Username of the person who responded
[options.user2]
string
Username of the other person
[options.hex1]
string
Hexadecimal color of the person who responded
[options.hex2]
string
Hexadecimal color of the other person
[options.mainText]
string
Message of the person who responded
[options.replyText]
string
Message of the other person
Example
Last updated