我正在尝试制作一部电影,同时通过一个循环创建帧。这是节省,但只有第一帧(它作为电影播放-短片!)我试过各种各样的东西,却不知道自己做错了什么。谢谢
def synthesiseFrame(folder):
folder =r"D:\FOLDER"
m=0.5
for x in range(1,121):
pic=makeEmptyPicture(960,540)
for x in range (0,960):
for y in range (0,540):
r=#some code
g=#some code
b=#some code
color =makeColor (r,g,b)
px= getPixel (pic, x, y)
setColor(px, color)
numStr=str(x)
m=m+0.0125
if x<10:
writePictureTo(pic, folder+"\pic00"+numStr+".png")
if x >=10 and x<100:
writePictureTo(pic, folder+"\pic0"+numStr+".png")
if x>=100:
writePictureTo(pic,folder+"\pic"+numStr+".png")
return movie
movie=synthesiseFrame(folder)
folder =r"D:\FOLDER"
file=r"D:\FOLDER\pic00.png"
movie=makeMovieFromInitialFile(file)
writeQuicktime(movie,"D:\FOLDER\movie.mov", 30)
playMovie(movie)
我改变了你的密码。在
synthesiseFrame
中的循环从1开始。在import os
编辑
x
(在外循环中)->;frameNumber
我在JES video functions和您的代码中的第一眼就告诉我类似(完全有效的示例):
输出(帧):
……………………………………。。。。。。在
编辑:
更有趣的是:动画一行(代码采用here)。。。在
^{pr2}$输出(帧):
…………………………………………。。。。。。在
相关问题 更多 >
编程相关推荐