【问题标题】:Python Zelle graphics - image errorPython Zelle 图形 - 图像错误
【发布时间】:2015-11-22 14:43:05
【问题描述】:

使用 Mac,我试图将程序的背景设置为我下载的图像,我将图像命名为“ChristmasBackground.jpg”并将其保存到我的文档中。使用 Zelle 图形,这是我写的:

XmasBack = Image(Point(600,100),"ChristmasBackground.jpg")
XmasBack.draw(win)

但程序给我一个错误提示:

couldn't open "ChristmasBackground.jpg": no such file or directory

【问题讨论】:

    标签: python image error-handling zelle-graphics


    【解决方案1】:

    只需将其放在脚本的同一文件夹中或写入文件路径

    【讨论】:

    • 当我把它放在 python 应用程序文件夹中时仍然给我同样的错误。
    • 是 PIL 库吗? @MostafaMohsen
    • 如何访问 PIL?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-12-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多