Skip to content

Commit

Permalink
Thanks Dylan
Browse files Browse the repository at this point in the history
  • Loading branch information
KenwoodFox committed Dec 12, 2024
1 parent d94b6ab commit 7d7c107
Show file tree
Hide file tree
Showing 2 changed files with 29 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.
29 changes: 29 additions & 0 deletions admin_bot/admin_bot/utilities/image_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,32 @@ def keegan_task(input_image: Image.Image) -> Image.Image:
result_image.paste(foreground, (0, 0), foreground)

return result_image


@register_image_task("dylan")
def dylan_task(input_image: Image.Image) -> Image.Image:
"""
Dylan dosn't like what you put on his phone
"""

# Load the foreground overlay (ensure it has an alpha channel)
foreground = Image.open("admin_bot/resources/dylan_disappointed/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((490, 230))

# Rotate image clockwise
rotated_image = resized_image.rotate(-1.4, expand=True)

# Paste the rotated image onto the result image
result_image.paste(rotated_image, (65, 460))

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

return result_image

0 comments on commit 7d7c107

Please sign in to comment.