2016-05-31 1 views
-1

나는 베개에 익숙하지 않지만 내 지식이 간다면 베개가 나를 도울 수 있다는 것을 이해합니다. 사용자가 업로드 한 그림을 자동으로 편집하고 싶습니다. 예를 들어Python 베개 자동 이미지 편집

자동 편집이이 enter image description here 또는 이에 따라이 enter image description here-enter image description here 또는 enter image description hereenter image description here

.

베개로 할 수 있습니까? 이 문제를 어떻게 해결해야합니까?

답변

0

.blend 방법을 사용해 볼 수 있습니다. 두 개의 이미지 image1image2를 들어

: 당신이 지정하려는 경우 또는

from PIL import Image 
image1 = Image.open(path1) 
image2 = Image.open(path2) 
new_image = Image.blend(image1, image2, alpha) 
#save/do stuff 

는 좌표

image1.paste(image2, (x, y), mask) 
나는 그것을 시도하지만 기능이 필요하면 내가 할 방법을 모르는
+0

항목 중 하나를 적절하게 크기 조정하십시오. – HellOfACode