Initial commit

This commit is contained in:
Aherobo Ovie Victor
2025-07-19 11:55:09 +01:00
commit 49c82456c9
19 changed files with 36092 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
import requests
from PIL import Image
from io import BytesIO
def download_image(image_url: str, save_path: str) -> None:
"""
Download an image from a URL and save it to a local path.
Args:
image_url (str): The URL of the image to download.
save_path (str): The local file path to save the image.
"""
response = requests.get(image_url)
response.raise_for_status()
image = Image.open(BytesIO(response.content))
image.save(save_path)