http://blog.csdn.net/xiezhiyong3621/article/details/8499543

class Image
Methods defined here:

__getattr__(self, name)
__init__(self)
__repr__(self)
convert(self, mode=None, data=None, dither=None, palette=0, colors=256)
Convert to other pixel format
copy(self)
Copy raster data
复制一个新的对象
crop(self, box=None)
Crop region from image
draft(self, mode, size)
Configure image decoder
filter(self, filter)
Apply environment filter to image
fromstring(self, data, decoder_name='raw', *args)
Load data to image from binary string
从原始图像数据中加载图像,一般用来从剪切板中获取图像
getbands(self)
Get band names
getbbox(self)
Get bounding box of actual data (non-zero pixels) in image
获取当前图像在实际图片中的范围
getcolors(self, maxcolors=256)
Get colors from image, up to given limit
getdata(self, band=None)
Get image data as sequence object.
获取图像数据列表。如果指定band,就获取这个颜色通道的值得列表

1.print im.getdata()[0]
2.(253,23,34)

getextrema(self)

Get min/max value
getim(self)
Get PyCObject pointer to internal image memory
getpalette(self)
Get palette contents.
getpixel(self, xy)
Get pixel value
获取每个坐标像素点的RGB值。参数xy格式为(x,y)
getprojection(self)
Get projection to x and y axes
histogram(self, mask=None, extrema=None)
Take histogram of image
load(self)
Explicitly load pixel data.
offset(self, xoffset, yoffset=None)
(deprecated) Offset image in horizontal and/or vertical direction
paste(self, im, box=None, mask=None)
Paste other image into region
point(self, lut, mode=None)
Map image through lookup table
putalpha(self, alpha)
Set alpha layer
putdata(self, data, scale=1.0, offset=0.0)
Put data from a sequence object into an image.
putpalette(self, data, rawmode='RGB')
Put palette data into an image.
putpixel(self, xy, value)
Set pixel value
设置某坐标像素点值
quantize(self, colors=256, method=0, kmeans=0, palette=None)
resize(self, size, resample=0)
Resize image
重新设置图像大小
rotate(self, angle, resample=0, expand=0)
Rotate image. Angle given as degrees counter-clockwise.
旋转图像
save(self, fp, format=None, **params)
Save image to file or stream
保存图像
seek(self, frame)
Seek to given frame in sequence file
定位到动画某一帧,一般用于gif格式的文件图片
show(self, title=None, command=None)
Display image (for debug purposes only)
现实图像,调用默认的图像浏览器
split(self)
Split image into bands
将图像按照RGB分别解析,返回三个Image对象
tell(self)
Return current frame number
返回当前帧号
thumbnail(self, size, resample=0)
Create thumbnail representation (modifies image in place)
创建缩略图,主要用来修改图像大小和清晰度,以便生产较小的文件
tobitmap(self, name='image')
Return image as an XBM bitmap
tostring(self, encoder_name='raw', *args)
Return image as a binary string
transform(self, size, method, data=None, resample=0, fill=1)
Transform image
transpose(self, method)
Transpose image (flip or rotate in 90 degree steps)
verify(self)
Verify file contents.

--------------------------------------------------------------------------------
Data and other attributes defined here:

format = None
mode

format_description = None

#功能:
blend(im1, im2, alpha)
Interpolate between images.
将两张图片混合到一起。参数alpha是im1与im2的混合权重,范围为[0,1]

Python PIL库之Image注解(API)的更多相关文章

  1. Python PIL 库的应用

    PIL (Python Image Library) 库是Python 语言的一个第三方库,PIL库支持图像存储.显示和处理,能够处理几乎所有格式的图片. 一.PIL库简介 1. PIL库主要有2个方 ...

  2. python PIL 库处理文件

    通过PIL库提供的API接口可以很方便的处理图像,功能十分强大: 最近有一个替换png背景色的需求,替换背景色的同时又不能够覆盖原来的文字,之前利用perl 的CD 模块一直没能够正确处理,最终用PI ...

  3. Python PIL库学习笔记

    1.PIL简介 Python Imaging Library(缩写为PIL)(在新的版本中被称为Pillow)是Python编程语言的开源库,它增加了对打开,操作和保存许多不同图像文件格式的支持.它适 ...

  4. 使用Python PIL库中的Image.thumbnail函数裁剪图片

    今天,是我来到博客园的第五天,发现自己还没有头像,想着上传ubuntu系统中我很喜欢的一个背景图片来当头像,但是因为图片过大,上传失败了.那么,我们如何使用python中强大的PIL库来进行图片裁剪呢 ...

  5. python PIL库的使用

    )PIL可以做很多和图像处理相关的事情: 图像归档(Image Archives).PIL非常适合于图像归档以及图像的批处理任务.你可以使用PIL创建缩略图,转换图像格式,打印图像等等. 图像展示(I ...

  6. 基于Python PIL实现简单图片格式转化器

    基于Python PIL实现简单图片格式转化器 目录 基于Python PIL实现简单图片格式转化器 1.简介 2.前期资料准备 2.1.1如何实现图片格式转换? 2.1.2如何保存需要大小的图片? ...

  7. Python图像处理库(PIL)

    官方:(详细)http://pillow.readthedocs.io/en/3.1.x/reference/ImageDraw.html http://pillow.readthedocs.io/e ...

  8. ❤️【Python从入门到精通】(二十六)用Python的PIL库(Pillow)处理图像真的得心应手❤️

    您好,我是码农飞哥,感谢您阅读本文,欢迎一键三连哦. 本篇重点介绍Python处理图像的标准库PIL库,处理图像真的的很方便. 干货满满,建议收藏,需要用到时常看看. 小伙伴们如有问题及需要,欢迎踊跃 ...

  9. Python 之 使用 PIL 库做图像处理

    http://www.cnblogs.com/way_testlife/archive/2011/04/17/2019013.html Python 之 使用 PIL 库做图像处理 1. 简介. 图像 ...

随机推荐

  1. 关于post请求参数的大小限制的说明

    最近做一个上传图片的项目,前端使用jquery 的post提交,然后把上传的图片的base64码 传到后台,发现几KB或者几十KB的图片,都可以传到后台,但是在上传几M 的图片在后台接收的时候,发现传 ...

  2. JavaScript入门(9)

    一.Math对象 Math对象,提供对数据的数学计算 使用Math的属性和方法,代码如下: <script type="text/javascript"> var my ...

  3. List中的get(i)

    List中的get(i)方法是获取List中的第i个对象吗 是第i+1个对象.List是从0开始的 List是有序的可重复的集合接口

  4. Visual Studio.NET、asp.net和C#间的关系是怎样的?

    asp.net是一种技术,要实现这种技术,就得有底层的实现技术编程语言,这个语言就是C#,(只是绝大多数首选C#),要想用C#实现asp.net技术,就得有编程的工具软件,这个软件我一直用visual ...

  5. JDBC与ODBC的区别与应用

    jdbc是使用通过JAVA的数据库驱动直接和数据库相连,而jdbc-odbc连接的是ODBC的数据源,真正与数据库建立连接的是ODBC! 建议使用JDBC直接连接,同时最好使用连接池! JDBC 是 ...

  6. Activiti 工作流会签开发设计思路

    http://man1900.iteye.com/blog/1607753 在流程业务管理中,任务是通常都是由一个人去处理的,而多个人同时处理一个任务,这种任务我们称之为会签任务.这种业务需求也很常见 ...

  7. Acitivity间数据的传递

    使用startActivityForResult方法进行数据传递.    MainActivity.java: public class MainActivity extends Activity { ...

  8. selenium2.0处理case实例(二)

    本文通过具体代码处理过程, 来展示selenium中一些比较不常用的类的用法 1.javascriptExcutor,通过将driver强转成JavascriptExecutor类型, 调用execu ...

  9. XMPP即时通讯(代码实现)

    1.配置XMPP(XMPPConfig.m) 2.配置XMPPFramework框架 3.创建单例类(XMPPManager.h/XMPPManager.m)管理器 XMPPManager.m: #i ...

  10. KMP入门(匹配)

    Description Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M ...