-
Notifications
You must be signed in to change notification settings - Fork 1
Canvas
The Canvas Category of this library provides various image manipulation features such as overlays, filters, and memes. With the Canvas Category, you can easily create customized images by providing inputs such as image URLs, text, and colors. Whether you want to add a Wasted overlay to an avatar or generate a meme with custom text, the Canvas Category has got you covered.
The Main Class of Canvas/Filter.
Blueify your Avatar.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Filter class
filters = canvas.Filter()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.Blue(avatar_url)
Blurplify your Avatar.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Filter class
filters = canvas.Filter()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.Blurple(avatar_url)
Blurplify your Avatar (New Discord blurple).
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Filter class
filters = canvas.Filter()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.Blurple2(avatar_url)
Brighten your Avatar.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). -
brightness (int, optional): The Brightness Power (Format must be within
0 - 255
). Defaults to "30". - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. -
InvalidBrightnessPower: Raised when the Brightness is not within
0 - 255
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Filter class
filters = canvas.Filter()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.Brightness(avatar_url)
Tint your Avatar a certain color.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - color (str): The Color Code in HEX without #
- name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - InvalidHEXColor: Raised when the HEX Color given, is invalid.
- APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Filter class
filters = canvas.Filter()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.Tint(avatar_url, color="d44242")
Tint your Avatar a certain color. An alias of Tint
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - color (str): The Color Code in HEX without #
- name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - InvalidHEXColor: Raised when the HEX Color given, is invalid.
- APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Filter class
filters = canvas.Filter()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.Color(avatar_url, color="d44242")
Make your Avatar green like the Hulk.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Filter class
filters = canvas.Filter()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.Green(avatar_url)
Greyscale your Avatar.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Filter class
filters = canvas.Filter()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.Greyscale(avatar_url)
Invert and grayscale your Avatar.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Filter class
filters = canvas.Filter()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.InvertGrayscale(avatar_url)
Redify your Avatar.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Filter class
filters = canvas.Filter()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.Red(avatar_url)
Apply a sepia filter to your Avatar.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Filter class
filters = canvas.Filter()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.Sepia(avatar_url)
Threshold your Avatar.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - threshold (int, optional): Threshold Power. Defaults to "100".
- name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. -
ThresholdError: Raised when the Threshold Power is not within
0 - 255
- APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Filter class
filters = canvas.Filter()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.Threshold(avatar_url, threshold=150)
The Main Class of Canvas/Misc.
Add a bisex flag border to your Avatar.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Misc class
filters = canvas.Misc()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.BisexualBorder(avatar_url)
Blur your Avatar.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Misc class
filters = canvas.Misc()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.Blur(avatar_url)
Crop an image to a Circle.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Misc class
filters = canvas.Misc()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.CircleCrop(avatar_url)
View a color.
- hex (str): The Color Code in HEX without #
- name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
- InvalidHEXColor: Raised when the HEX color code given, is invalid
- APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Misc class
filters = canvas.Misc()
# Get and save the image
filters.ColorViewer(avatar_url)
Crop an image to a heart shape.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Misc class
filters = canvas.Misc()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.HeartCrop(avatar_url)
Blur your Avatar.
- rgb (str): RGB Color Code
- str: HEX Color Code
- InvalidRGBCode: Raised when the RGB Code given is invalid
- APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Misc class
filters = canvas.Misc()
# Get the HEX Code
filters.RGBtoHEX("0, 0, 50")
Makes Horny card with the Avatar.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Misc class
filters = canvas.Misc()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.Horny(avatar_url)
Make an "Its so stupid" meme with your Avatar
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Misc class
filters = canvas.Misc()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.ItsSoStupid(avatar_url)
Blur your Avatar. An alias of Blur
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Misc class
filters = canvas.Misc()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.Jpg(avatar_url)
Add a lesbian flag border to your Avatar.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Misc class
filters = canvas.Misc()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.LesbianBorder(avatar_url)
Add a lgbt flag border to your Avatar.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Misc class
filters = canvas.Misc()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.LGBTBorder(avatar_url)
Make Loli police to your Avatar.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Misc class
filters = canvas.Misc()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.Lolice(avatar_url)
GenshinNamecard(avatar_url: str, username: str, birthday: str, description: str = None, name: str = "image.png")
Make Genshin Namecard
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - username (str): A Username
- birthday (str): A Birthday
- description (str, optional): A description for the Card. Defaults to "(No Signature)"
- name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Misc class
filters = canvas.Misc()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.GenshinNamecard(avatar_url=avatar_url, username="Tahsin", birthday="1/1/2000")
Make No Bitches Meme.
- text (str): Text
- name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
- APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Misc class
filters = canvas.Misc()
# Get and save the image
filters.NoBitches(text="Hello")
Make Nonbinary Bordered Avatar.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Misc class
filters = canvas.Misc()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.NonbinaryBorder(avatar_url)
Make Oogway meme with custom quote.
- quote (str): The Custom Quote
- name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Misc class
filters = canvas.Misc()
# Get and save the image
filters.Oogway(quote="sra is poggers")
Make Oogway meme with custom quote. (Updated)
- quote (str): The Custom Quote
- name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Misc class
filters = canvas.Misc()
# Get and save the image
filters.Oogway2(quote="sra is poggers")
Make Pansexual Bordered Avatar.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Misc class
filters = canvas.Misc()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.PansexualBorder(avatar_url)
Make your Pixelated Avatar.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Misc class
filters = canvas.Misc()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.Pixelate(avatar_url)
Converts HEX code to RGB code.
- hex (str): the HEX Code
- str: RGB Code
- InvalidHEXColor: Raised when HEX color code given, is invalid.
- APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Misc class
filters = canvas.Misc()
# Get the RGB Code
filters.HEXtoRGB("000032")
Make Simp Card with your Avatar.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Misc class
filters = canvas.Misc()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.SimpCard(avatar_url)
Make Tonikawa with your Avatar.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Misc class
filters = canvas.Misc()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.Tonikawa(avatar_url)
Make Transgender Border with your Avatar.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Misc class
filters = canvas.Misc()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.TransgenderBorder(avatar_url)
Tweet(display_name: str, username: str, avatar_url: str, comment: str, replyNumber: int = None, likeNumber: int = None, retweetNumber: int = None, theme: str = 'light', name: str = "image.png")
Blur your Avatar.
- display_name (str): A Username for the Tweet.
- username (str): A Username for the Tweet.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - comment (str): The Comment.
- replyNumber (int, optional): Number of Replies.
- likeNumber (int, optional): Number of Likes.
- retweetNumber (int, optional): Number of retweets.
- theme (str, optional): Tweeter Theme. Defaults to "light".
- name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
- DisplayNameError: Raised when the Display Name doesn't meet the conditions
- UsernameError: Raised when the Username doesn't meet the conditions
- CommentError: Raised when the Comment doesn't meet the conditions
- ThemeError: Raised when the Theme is Invalid
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Misc class
filters = canvas.Misc()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.Tweet(display_name="Tahsin", username="Tahsin#0242", avatar_url=avatar_url, comment="Look, I'm using the sra-pylib Library!!!")
Make Fake Youtube Comment.
- username (str): A Username for the Comment
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - comment (str): The Comment
- name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Misc class
filters = canvas.Misc()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.YoutubeComment(username="Tahsin", avatar_url=avatar_url, comment="sra-pylib is Awesome!!!")
The Main Class of Canvas/Overlay.
Make Comraded Avatar
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Overlay class
filters = canvas.Overlay()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.Comrade(avatar_url)
Give your Avatar a rainbow overlay.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Overlay class
filters = canvas.Overlay()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.Gay(avatar_url)
Give your Avatar a glass effect overlay
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Overlay class
filters = canvas.Overlay()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.Glass(avatar_url)
Make your Avatar Jailed
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Overlay class
filters = canvas.Overlay()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.Jail(avatar_url)
Mission passed overlay to your Avatar.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Overlay class
filters = canvas.Overlay()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.Passed(avatar_url)
Get a Triggered GIF with your Avatar.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.gif
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Overlay class
filters = canvas.Overlay()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.Triggered(avatar_url)
Give your Avatar a Wasted overlay.
-
avatar_url (str): Avatar URL (Format must be
.jpg
or.png
). - name (str, optional): Image name/path. Defaults to "image.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageNotFound: Raised when the gif fails to save.
- ImageRetrieveError: Raised when the gif fails to load.
-
InvalidAvatarURL: Raised when the Avatar URL with unsupported file format is given rather than
.jpg
or.png
. - APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import canvas
# Create a new instance of the Overlay class
filters = canvas.Overlay()
# Discord Avatar
avatar_url = "https://res.cloudinary.com/dvx7o1atn/image/upload/v1680858950/Tahsin_AVATR_astronaut_yannbh.png"
# Get and save the image
filters.Wasted(avatar_url)
sra-pylib by Sayad Uddin Tahsin
-
Animal
-
Animu
-
Canvas
-
Facts
-
Image
-
Others
-
Pokemon
-
Chatbot
-
Welcome (Free)
- ImageNotFound
- InvalidFileFormat
- APITimeout
- APIError
- ImageRetrieveError
- InvalidAvatarURL
- InvalidImageURL
- InvalidHEXColor
- InvalidBrightnessPower
- InvalidRGBCode
- DisplayNameError
- UsernameError
- CommentError
- ThemeError
- InvalidTemplate
- InvalidBackground
- InvalidFont
- InvalidType
- InvalidTextColor
- ThresholdError