Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是编程的初学者,似乎无法弄清楚如何bgpic('photo.gif')在turtle中使用。
bgpic('photo.gif')
我已将“photo.gif”附在与脚本相同的文件夹中。每次我用 bgpic 执行程序时,海龟窗口都会崩溃。我必须调整图片大小吗?改变它的格式?
bgpic 只接受 gif 图像。
您应该使用 photoshop 或其他类似工具将图像转换为 gif 格式,或者使用例如 python PIL 以编程方式进行转换