Skip to content

Add image resizing ??? #26

@Daethyra

Description

@Daethyra
from PIL import Image
import sys
def operate_image(target_image: str) -> Image:
    try:
        image = Image.open(target_image)
        width, height = image.size
        return image.resize(
            size=(width * 2, height * 2),
            resample=Image.Resampling.LANCZOS
        )
    except Exception as e:
        raise RuntimeError(f"Failed to chug on this mf chode! {e}")
if __name__ == "__main__":
    
    werk = operate_image("Batman-slapping-Robin-Meme-Blank.png")
    werk.save("Batman-slapping-Robin-Meme-Blank_resized.png")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions