Skip to content

Instantly share code, notes, and snippets.

@gcrsaldanha
gcrsaldanha / criar_imagem.py
Last active January 11, 2025 00:58
Criando imagens com Python (Pillow)
# Para mais conteúdos de Python, acesse: https://instagram.com/gabrielsaldanha.dev
# É necessário ter Pillow instalado:
# $ python3 -m pip install Pillow
from PIL import Image, ImageDraw, ImageFont
image = Image.new("RGB", (1080, 1080), color=(41, 46, 48))
img_draw = ImageDraw.Draw(image)
# Arquivo de fonte Helvetica.ttc deve estar no mesmo diretório
# que o programa está sendo executado