Skip to content

Commit

Permalink
Revert "removing unwanted files" (and others)
Browse files Browse the repository at this point in the history
This reverts commit 0589d3e and others made by @dublUayaychtee
  • Loading branch information
KenwoodFox committed Jan 8, 2025
1 parent b99234f commit b16dbd6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions admin_bot/admin_bot/utilities/image_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,34 @@ def four_corners(image: Image.Image, output_corners):
# you want to do something other than four corners transform


@register_image_task("keegan")
def keegan_task(input_image: Image.Image) -> Image.Image:
"""
Keegan transformations lol!
"""
# Load the foreground overlay (ensure it has an alpha channel)
foreground = Image.open(
"admin_bot/resources/what_is_keegan_looking_at/fore.png"
).convert("RGBA")

# Create a new blank RGBA image with the same size as the foreground
result_image = Image.new("RGBA", foreground.size, (0, 0, 0, 0)) # Fully transparent

# Resize image to fit screen
resized_image = input_image.resize((1550, 900))

# Rotate image counterclockwise by 38.2 degrees
rotated_image = resized_image.rotate(38.2, expand=True)

# Paste the rotated image onto the result image
result_image.paste(rotated_image, (240, 780))

# Place the foreground on top
result_image.paste(foreground, (0, 0), foreground)

return result_image


@register_image_task("dylan")
def dylan_task(input_image: Image.Image) -> Image.Image:
"""
Expand Down

0 comments on commit b16dbd6

Please sign in to comment.