Python中文
首页
教程
问答
标签
搜索
登录
注册
在python中快速加载和显示图像(利用python中的Libjpeg Turbo?)
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>我目前正在使用Tkinter和PIL在python中创建一个图像查看器,但是我希望图像加载更快。因此,我想知道如何安装和使用libjpegturbo与Tkinter和PIL,或者我是否应该使用不同的GUI工具包,比如pyQT或者不同的图像库(我发现了一个叫做OpenCV的东西?)。在</p> <p>那么,本质上,在python中加载、调整大小和显示大图像的最佳和最快方式是什么?在</p> <p>编辑: 我认为主要的瓶颈是图像大小调整,它是可见的,但在此之前它是图像加载本身。但我不能确定,因为我不知道如何衡量这样一件事,因为我本质上是一个python新手。在</p> <p>我所做的基本上是一个极简主义的图像查看器。如果你想看我的代码,它在这里:<a href="http://pastebin.com/fwf8b0cU" rel="nofollow">http://pastebin.com/fwf8b0cU</a></p> <p>编辑2:我已经运行了一堆cProfile,修复了一些代码,修复了一些速度慢的问题。所以现在我的问题是,我应该使用另一个GUI工具包,比如pyQT还是其他的图像库(我发现了一个叫做OpenCV的东西?)。在</p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>如果您想缩小瓶颈的来源,我将从对代码的各个部分调用<a href="http://docs.python.org/library/timeit.html" rel="nofollow">timeit</a>开始。如果这没有帮助,或者看起来太费劲了,可以看看<a href="http://docs.python.org/library/profile.html" rel="nofollow">Python Profilers</a></p>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
如何添加虚拟方法
5 回答
如何添加表示整数的擦边字符串?
9 回答
如何添加要在Bokeh中使用的新font.ttf文件?
7 回答
如何添加要显示的矩阵XY轴编号和XY轴
4 回答
如何添加计数?
10 回答
如何添加计数器函数?
3 回答
如何添加计数器列来计算数据帧中另一列中的特定值?
3 回答
如何添加计数器来跟踪while循环中的月份和年份?
9 回答
如何添加计数并删除countplot的顶部和右侧脊椎?
6 回答
如何添加计时器wx.应用程序更新窗口对象的主循环?
3 回答
如何添加评论到帖子?PostDetailVew,Django 2.1.5
4 回答
如何添加评论拉梅尔亚姆
10 回答
如何添加诸如矩阵Python/Pandas之类的数据帧?
7 回答
如何添加谷歌地点自动完成到Flask?
10 回答
如何添加超时、python discord bot
9 回答
如何添加超过1dp的检查
7 回答
如何添加距离方法
2 回答
如何添加跟随游戏的敌人精灵
3 回答
如何添加路径以便python可以找到程序?
5 回答
如何添加身份验证/安全性以使用happybase访问HBase?
1 回答