🛠️ToolsShed

이미지 리사이즈

브라우저에서 이미지를 원하는 크기로 조정 — 서버 업로드 없음.

자주 묻는 질문

코드 구현

from PIL import Image

# Open and resize to exact dimensions
img = Image.open("input.jpg")
resized = img.resize((800, 600), Image.LANCZOS)
resized.save("output.jpg")

# Resize to percentage (50%)
width, height = img.size
half = img.resize((width // 2, height // 2), Image.LANCZOS)
half.save("half_size.jpg")

# Resize maintaining aspect ratio (max width 800)
img.thumbnail((800, 800), Image.LANCZOS)
img.save("thumbnail.jpg")

Comments & Feedback

Comments are powered by Giscus. Sign in with GitHub to leave a comment.