python图形处理库Python Imaging Library (PIL)简介及安装
来源:互联网 发布:汇编语言 多维数组 编辑:程序博客网 时间:2024/05/16 17:06
[简介]
这两天用python写一个程序,需要对各种格式的图片进行一些简单的处理,采用了Python Imaging Library (PIL)库,这个库可用于图片的一些常用操作,比如改变图片格式、尺寸、色彩、旋转等。
pil站点: http://www.pythonware.com/products/pil/index.htm
pil下载: http://effbot.org/downloads/Imaging-1.1.6.tar.gz
pil文档: http://www.pythonware.com/library/pil/handbook/index.htm
[安装]
$ gunzip Imaging-1.1.6.tar.gz
$ tar xvf Imaging-1.1.6.tar
$ cd Imaging-1.1.6
$ python setup.py build_ext -i
$ python selftest.py
$ python setup.py install
安装完毕后,可在python安装目录下的site-packages找到PIL安装目录。
[使用]
这两天用python写一个程序,需要对各种格式的图片进行一些简单的处理,采用了Python Imaging Library (PIL)库,这个库可用于图片的一些常用操作,比如改变图片格式、尺寸、色彩、旋转等。
pil站点: http://www.pythonware.com/products/pil/index.htm
pil下载: http://effbot.org/downloads/Imaging-1.1.6.tar.gz
pil文档: http://www.pythonware.com/library/pil/handbook/index.htm
[安装]
$ gunzip Imaging-1.1.6.tar.gz
$ tar xvf Imaging-1.1.6.tar
$ cd Imaging-1.1.6
$ python setup.py build_ext -i
$ python selftest.py
$ python setup.py install
安装完毕后,可在python安装目录下的site-packages找到PIL安装目录。
[使用]
如果你想使用PIL的Image类,就直接import Image即可,详细的使用方法请阅读其文档。
2. 解决Python.h No such file or directory
1.可以先查看一下含python-devel的包
yum search python | grep python-devel
2.64位安装python-devel.x86_64,32位安装python-devel.i686,我这里安装:
sudo yum install python-devel.x86_64
3. 进入/usr/include/python2.7看一下现在有没有Python.h,版本不同目录名不同,我这里是2.7版本。其实也可以看到很多.h文件,python需要库或头文件都在这个地方。
0 0
- python图形处理库Python Imaging Library (PIL)简介及安装
- python图形处理库Python Imaging Library (PIL)简介及安装
- python 安装PIL Python Imaging Library
- PIL Python Imaging Library (PIL)
- 如何安装Python图型处理库Python Imaging Library(PIL)
- 安装 Python Imaging Library(PIL)
- Python.PIL -- Python Imaging Library
- PIL (Python Imaging Library) 教程
- PIL (Python Imaging Library) 教程
- (Python问题一)python 安装PIL (Python Imaging Library )
- 以Python Imaging Library 进行影像资料处理PIL
- 以Python Imaging Library 进行影像资料处理PIL
- python图形处理库PIL(Python Image Library)
- python图形处理库PIL(Python Image Library)的基本概念
- python图形处理库PIL(Python Image Library)的介绍
- python安装图形库PIL
- 安装Python Imaging Library记录
- Python 介绍一 —— PIL(Python Imaging Library)
- 两个小故事:吞吐量与延迟,信号量与互斥锁
- VIM代码折叠
- cocos2dx 网络编程(CCHttpRequest和CURL两个方式)
- 在Xcode中使用Git进行源码版本控制
- opencv2利用直方图对图像的反投影算法
- python图形处理库Python Imaging Library (PIL)简介及安装
- Microsoft Office 2010组件介绍
- 互斥体
- 第十八周项目四-1 定义结构体算两人生日相差多少天
- 第17周 o j
- spring aop(四)--基于@AspectJ
- javascript调用百度地图api
- P2P平台面临“年关”
- 数学专题题集