python报错_couldntrecognizedatainimagefile

更新时间:2023-05-19 10:22:57 阅读: 评论:0

python报错_couldntrecognizedatainimagefile ⼀、描述
报错:couldn't recognize data in image file
代码:螨虫的症状
from tkinter import *
root = Tk()
养驴技术theLabel = Label(root,text="dog",justify=LEFT,padx=10)
山大视点
theLabel.pack(side=LEFT)
photo = PhotoImage(file="D:/PythonProject/dog.jpg")
imgLabel = Label(root,image=photo)
imgLabel.pack(side=RIGHT)在一起多好
root.mainloop()
2022高考文综
2.原因男女之间
感动中国2016
PhotoImage报错,因为file参数只接受gif⽂件,不能接受jpeg、jpg⽂件。
gif⽂件不单指以.gif结尾的⽂件,⽽是说图⽚格式,所以只修改后缀名没有丝毫作⽤。
3.解决
1.上⽹download⼀个gif⽂件。
2.打开,另存成其他格式的⽂件。
3.使⽤其他模块。北极星电影

本文发布于:2023-05-19 10:22:57,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/82/693268.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:修改   接受   参数   另存   格式   螨虫
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图