0
아래 코드는 한 가지를 제외하고는 잘 작동합니다. 축소하는 동안 원본 이미지 크기에서 시작하여 축소하여 가장자리에 검은 색 공간이 생깁니다.움직이는 카메라로 moviepy 이미지 슬라이드 쇼
"검은 색 공간"없이 축소 효과를 구현하는 방법은 무엇입니까? 당신이 확대되면
from moviepy.editor import *
def zoomOut(t):
return 1 - 0.03 * t # Zoom-in.
def zoomIn(t):
return 1 + 0.03 * t # Zoom-in.
ImageClip(img_file)
.resize(zoomIn) #.resize(zoomOut)
.set_position(('center', 'center'))
.set_duration(2)
vid = concatenate(slides, method="compose")
vid.write_videofile('test.mp4', fps=24)