Skip to content
Sayad Uddin Tahsin edited this page Apr 7, 2023 · 4 revisions

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.

class Filter

The Main Class of Canvas/Filter.

Blue(avatar_url: str, name: str = "image.png")

Blueify your Avatar.

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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)

Blurple(avatar_url: str, name: str = "image.png")

Blurplify your Avatar.

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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)

Blurple2(avatar_url: str, name: str = "image.png")

Blurplify your Avatar (New Discord blurple).

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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)

Brightness(avatar_url: str, brightness: int = 30, name: str = "image.png")

Brighten your Avatar.

Parameters

  • 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".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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(avatar_url: str, color: str, name: str = "image.png")

Tint your Avatar a certain color.

Parameters

  • 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".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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")

Color(avatar_url: str, color: str, name: str = "image.png")

Tint your Avatar a certain color. An alias of Tint

Parameters

  • 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".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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")

Green(avatar_url: str, name: str = "image.png")

Make your Avatar green like the Hulk.

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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(avatar_url: str, name: str = "image.png")

Greyscale your Avatar.

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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)

InvertGrayscale(avatar_url: str, name: str = "image.png")

Invert and grayscale your Avatar.

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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)

Red(avatar_url: str, name: str = "image.png")

Redify your Avatar.

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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)

Sepia(avatar_url: str, name: str = "image.png")

Apply a sepia filter to your Avatar.

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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(avatar_url: str, threshold: int = 100, name: str = "image.png")

Threshold your Avatar.

Parameters

  • 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".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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)

class Misc

The Main Class of Canvas/Misc.

BisexualBorder(avatar_url: str, name: str = "image.png")

Add a bisex flag border to your Avatar.

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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(avatar_url: str, name: str = "image.png")

Blur your Avatar.

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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)

CircleCrop(avatar_url: str, name: str = "image.png")

Crop an image to a Circle.

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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)

ColorViewer(hex: str, name: str = "image.png"_)

View a color.

Parameters

  • hex (str): The Color Code in HEX without #
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

from sra import canvas

# Create a new instance of the Misc class
filters = canvas.Misc()

# Get and save the image
filters.ColorViewer(avatar_url)

HeartCrop(avatar_url: str, name: str = "image.png")

Crop an image to a heart shape.

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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)

RGBtoHEX(rgb: str)

Blur your Avatar.

Parameters

  • rgb (str): RGB Color Code
Returns
  • str: HEX Color Code

Exceptions

  • 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.

Example

from sra import canvas

# Create a new instance of the Misc class
filters = canvas.Misc()

# Get the HEX Code
filters.RGBtoHEX("0, 0, 50")

Blur(avatar_url: str, name: str = "image.png")

Makes Horny card with the Avatar.

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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)

ItsSoStupid(avatar_url: str, name: str = "image.png")

Make an "Its so stupid" meme with your Avatar

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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)

Jpg(avatar_url: str, name: str = "image.png")

Blur your Avatar. An alias of Blur

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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)

LesbianBorder(avatar_url: str, name: str = "image.png")

Add a lesbian flag border to your Avatar.

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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)

LGBTBorder(avatar_url: str, name: str = "image.png")

Add a lgbt flag border to your Avatar.

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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)

Lolice(avatar_url: str, name: str = "image.png")

Make Loli police to your Avatar.

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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

Parameters

  • 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".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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")

NoBitches(text: str, name: str = "image.png")

Make No Bitches Meme.

Parameters

  • text (str): Text
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

from sra import canvas

# Create a new instance of the Misc class
filters = canvas.Misc()

# Get and save the image
filters.NoBitches(text="Hello")

NonbinaryBorder(avatar_url: str, name: str = "image.png")

Make Nonbinary Bordered Avatar.

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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)

Oogway(quote: str, name: str = "image.png")

Make Oogway meme with custom quote.

Parameters

  • quote (str): The Custom Quote
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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")

Oogway2(quote: str, name: str = "image.png")

Make Oogway meme with custom quote. (Updated)

Parameters

  • quote (str): The Custom Quote
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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")

PansexualBorder(avatar_url: str, name: str = "image.png")

Make Pansexual Bordered Avatar.

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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)

Pixelate(avatar_url: str, name: str = "image.png")

Make your Pixelated Avatar.

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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)

HEXtoRGB(hex: str)

Converts HEX code to RGB code.

Parameters

  • hex (str): the HEX Code
Returns
  • str: RGB Code

Exceptions

  • 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.

Example

from sra import canvas

# Create a new instance of the Misc class
filters = canvas.Misc()

# Get the RGB Code
filters.HEXtoRGB("000032")

SimpCard(avatar_url: str, name: str = "image.png")

Make Simp Card with your Avatar.

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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)

Tonikawa(avatar_url: str, name: str = "image.png")

Make Tonikawa with your Avatar.

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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)

TransgenderBorder(avatar_url: str, name: str = "image.png")

Make Transgender Border with your Avatar.

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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.

Parameters

  • 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".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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!!!")

YoutubeComment(username: str, avatar_url: str, comment: str, name: str = "image.png")

Make Fake Youtube Comment.

Parameters

  • 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".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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!!!")

class Overlay

The Main Class of Canvas/Overlay.

Comrade(avatar_url: str, name: str = "image.png")

Make Comraded Avatar

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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)

Gay(avatar_url: str, name: str = "image.png")

Give your Avatar a rainbow overlay.

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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)

Glass(avatar_url: str, name: str = "image.png")

Give your Avatar a glass effect overlay

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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)

Jail(avatar_url: str, name: str = "image.png")

Make your Avatar Jailed

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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)

Passed(avatar_url: str, name: str = "image.png")

Mission passed overlay to your Avatar.

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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)

Triggered(avatar_url: str, name: str = "image.gif")

Get a Triggered GIF with your Avatar.

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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)

Wasted(avatar_url: str, name: str = "image.png")

Give your Avatar a Wasted overlay.

Parameters

  • avatar_url (str): Avatar URL (Format must be .jpg or .png).
  • name (str, optional): Image name/path. Defaults to "image.png".
Returns
  • bool: Returns True if the image was successfully saved.

Exceptions

Example

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)
Clone this wiki locally