Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from PIL import Image
- imagem = Image.open("local_da_Imagem, "r")
- largura, altura = imagem.size
- factor = 2
- W = largura
- H = altura
- nova_largura = int(largura*factor)
- nova_altura = int(altura*factor)
- nova_imagem = Image.new("RGB", (nova_largura, nova_altura))
- for col in range(nova_largura):
- for row in range(nova_altura):
- p = imagem.getpixel((col, row))
- nova_imagem.putpixel((col*factor, row*factor), 100)
- nova_imagem.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement