Cocoa QTMovie - 如何更改添加到电影中的每一帧的持续时间?
我正在通过向 QTMovie 添加图像帧来创建电影,每个帧应该显示大约 0.2 秒。但我得到的最接近的是每帧 1 秒。 我尝试在 QTTime 中输入小于 1 的量,但这样我的电影长度将为 0 秒,文档没有描述 QTMakeTime 中的参数是什么。 知道如何实现这一目标吗?
QTTime frameDuration = QTMakeTime(1, 1);
for (//here goes my loop to read each frame)
{
[movie addImage:img forDuration:frameDuration withAttributes:dict];
}
I am creating a movie by addoing image frames to my QTMovie, every frame is suppose to show up for about 0.2 seconds. But the closest I have got was 1 second per frame.
I tried etering amounts less than 1 into my QTTime but that way my movie length would be 0 seconds, the documentation doesn't describe what the parameters in QTMakeTime are.
Any idea how to achieve this?
QTTime frameDuration = QTMakeTime(1, 1);
for (//here goes my loop to read each frame)
{
[movie addImage:img forDuration:frameDuration withAttributes:dict];
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
第二个参数f是每秒的帧数
QTTime 帧持续时间 = QTMakeTime(1, 7);
这意味着每秒 7 帧,效果很好
the second parameterf is the number of frames per second
QTTime frameDuration = QTMakeTime(1, 7);
this means 7 frames per second which worked fine