Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
www.pyimagesearch.com/2015/05/11/creating-a-face-d...
only a photo studio is easier
maybe so
from PIL import Image
im = Image.open("путь")
mask = Image.open("путь")
#подгоняем под размеры маски, сделано без сохранения пропорций
w_img, h_img = mask.size
im = im.resize((w_img, h_img), Image.ANTIALIAS)
#накладываем маску поверх
im.paste(mask, (0, 0))
im.save("путь", quality=90)
.foto {
border-radius: 100px; /* Rounding radius */
border: 3px solid black; /* Frame options */
background-size: cover; /*Scales photo*/
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question