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. hackerrank Day 10: Binary Numbers

    Task Given a base-10 integer, n, convert it to binary (base-2). Then find and print the base-10 inte ...

  2. js实现过滤重复字符和重复数组-javascript技巧

    js实现过滤重复字符 <script type="text/javascript"> <!-- String.prototype.noRepeatStr=func ...

  3. Ajax效果

    Ajax的效果就是不通过网页的跳转,就可以通过请求,就可以自动加载某个网页,在注册帐号时,经常 不通过网页跳转从数据库中查看是否有相同数据的出现,确认是否能够正确注册 下面是用其他方式实现ajax的效 ...

  4. 【译文】NginScript – 为什么我们要实现自己的JS引擎?

    在上周的nginx.conf 2015用户大会上,我们发布了全新的JavaScript引擎nginscript的预览版.历史上,JavaScript语言已经应用在许多方面,首先是作为客户端脚本,然后又 ...

  5. 20140717 随笔 技术文章安家至CSDN

    今天意外的看到了阳光小强的博客,接着在CSDN里看着各种博客,又有一种冲动,想在CSDN里安家.我是一个不安分的人,或者说是不能坚持的人,喜新厌旧属于我吧.看到新鲜的就要去试一下,但是能够坚持下来的却 ...

  6. 第零篇、HTML5简介

    1.什么是HTML5? 背景:互联网的快速兴起 1>网页5.0版本 2>2014年才定制HTML5标准 3>移动先行 2.为什么要使用HTML5? 1>跨平台(可以运行所有的浏 ...

  7. HDOJ 1422 重温世界杯 -- 动态规划

    题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=1422 Problem Description 世界杯结束了,意大利人连本带利的收回了法国人6年前欠他们 ...

  8. Mac下修改默认的Java版本

    今天在安装Elicpse IDE的时候,发现提示安装的Java版本不支持,于是在官方去下载了Jre最新版本并安装,在安装完过后再次打开Elicpse发现提示还是不正确,如果用Google查询到一些资料 ...

  9. Linux C 程序 函数,数组,指针,gdb调试器(SEVEN)

    函数,数组,指针,gdb调试器 1.函数定义 如果明确指定返回类型,默认为int 参数传递:实参对形参的参数传递是单向的,实参只是把自己的值赋给形参.                      形参的 ...

  10. jQuery.hhLRSlider 左右滚动图片插件

    /**  * jQuery.hhLRSlider 左右滚动图片插件  * User: huanhuan  * QQ: 651471385  * Email: th.wanghuan@gmail.com ...