有没有一种使用 Pygame 制作和保存动画的简单方法? [英] Is there a simple way to make and save an animation with Pygame?

查看:44
本文介绍了有没有一种使用 Pygame 制作和保存动画的简单方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我制作了一个非常简单的分形生成器,可以打印出每一步;我想把它放在我做的演示文稿中.我用来做演示的工具显然不支持 pygame,有什么办法可以把它保存为视频?最好是动画 .gif 等.

解决方案

不是直接的.但是,您可以使用执行此操作的众多可用实用程序之一来保存程序的截屏视频.

我不了解 Windows 或 OSX,但如果您使用的是 Ubuntu 或其他基于 gnome 的桌面,您可以使用 gnome-shell 内置功能(标准键绑定是 Control+Shift+Alt+R) 或 istanbul(更多信息此处).

谷歌搜索 screencast <your-os-here> 如果你不在 Ubuntu 上应该会有所帮助.

保存视频后,您可以使用其他实用程序轻松转换其格式 - 如果您愿意的话.这里是一个操作方法如何从 ogv(Linux 截屏的标准输出)转换为动画 gif.

I made a very simple fractal generator that prints out each step; I want to put it in a presentation I made. The tool with which I'm making the presentation obviously doesn't support pygame, is there any way to save it as a video? Preferably as an animated .gif or the like.

解决方案

Not directly. But you can save a screencast of your program with one of the many available utilities that do this.

I don't know about Windows or OSX, but if you are on Ubuntu or other gnome-based desktop you can either use the gnome-shell built-in functionality (standard keybinding is Control+Shift+Alt+R) or istanbul (more info here).

Googling screencast <your-os-here> should help if you are not on Ubuntu.

EDIT: One you saved the video you can easily convert its format - if you so like - with other utilities. Here is a how-to on how to convert from ogv (the standard output for linux screencasting) to animated gif.

这篇关于有没有一种使用 Pygame 制作和保存动画的简单方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆