PIL for python (also,Tkinter)
来源:互联网 发布:微星主板编程器jsp1 编辑:程序博客网 时间:2024/05/17 03:45
PIL process Image Library
提前下载 PIL库
http://www.pythonware.com/products/pil/
下载对应的python版本的
安装之后在 D:\Program Files\python2.7.6\Lib\site-packages 目录下,就出现了 PIL目录啦。
显示一幅图像:
from PIL import Image, ImageTkimg = Image.open('10.bmp')print img.format, img.size, img.modeimg.show()
更多: http://www.oschina.net/question/89964_40268
====================
PS:
用 Tkinter 打开图像显示:
python 的 TK接口调用GUI的 打开图片的函数 默认的是 打开的 gif 的图像
from Tkinter import *#创建一个画布canvas = Canvas(width=800, height=600, bg='green')#start your canvas#在画布上加载图片im = PhotoImage(file = 'C:\\lh.gif') #使用PhotoImage打开图片【TK默认加载的是gif格式的图片】canvas.create_image(30, 50, image = im) #使用create_image将图片添加到Canvas组件中#end canvas.pack(expand=YES, fill=BOTH) #将canvas添加到主窗口 mainloop() #应该是让画布一直显示的吧
- PIL for python (also,Tkinter)
- Tkinter 8.5 参考手册: a GUI for Python(一)
- Python GUI (Tkinter)
- python Tkinter (1)
- Tkinter(python-GUI)
- Tkinter 8.5 参考手册: a GUI for Python
- Python Tkinter Hello,Tkinter
- python PIL
- python PIL
- python,PIL
- python-PIL
- python-PIL
- python PIL
- Tkinter 8.5 参考手册: a GUI for Python (五)8(鼠标)指针
- python tkinter
- python:Tkinter
- Python Tkinter
- Python3.4 tkinter,PIL图片转换(GUI)
- Source insight 代码对齐错误
- IE下overflow:hidden失效的解决方法
- Linux下的JDK安装与配置
- JAVA基础/属性
- activity中DatePickerDialog的使用
- PIL for python (also,Tkinter)
- Ubuntu12.04安装程序速度很慢的解决方法
- 销售最大的敌人是谁?
- 求最长回文子串(Longest Palindromic Substring)
- 淘宝开放平台请求参数的拼接方式
- linux补充学习
- C#操作Sqlite快速入门
- 压力测试工具,windows 环境安装 Jmeter安装
- 谈谈编程范式