楼主: Lisrelchen
1569 8

Python Imaging Library Overview [推广有奖]

  • 0关注
  • 62粉丝

VIP

已卖:4194份资源

院士

67%

还不是VIP/贵宾

-

TA的文库  其他...

Bayesian NewOccidental

Spatial Data Analysis

东西方数据挖掘

威望
0
论坛币
50288 个
通用积分
83.6306
学术水平
253 点
热心指数
300 点
信用等级
208 点
经验
41518 点
帖子
3256
精华
14
在线时间
766 小时
注册时间
2006-5-4
最后登录
2022-11-6

楼主
Lisrelchen 发表于 2016-8-18 23:50:31 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
Introduction The Python Imaging Library adds image processing capabilities to your Pythoninterpreter.This library provides extensive file format support, an efficient internal representation,and fairly powerful image processing capabilities.The core image library is designed for fast access to data stored in a few basic pixelformats. It should provide a solid foundation for a general image processing tool.Let's look at a few possible uses of this library:

本帖隐藏的内容

http://www.pythonware.com/media/data/pil-handbook.pdf


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Overview Library python BRARY Aging

本帖被以下文库推荐

沙发
Lisrelchen 发表于 2016-8-18 23:51:30
  1. Example: Create JPEG Thumbnails
  2. import os, sys
  3. import Image
  4. for infile in sys.argv[1:]:
  5. outfile = os.path.splitext(infile)[0] + ".thumbnail"
  6. if infile != outfile:
  7. try:
  8. im = Image.open(infile)
  9. im.thumbnail((128, 128))
  10. im.save(outfile, "JPEG")
  11. except IOError:
  12. print "cannot create thumbnail for", infile
复制代码

藤椅
Lisrelchen 发表于 2016-8-18 23:55:54
  1. Example: Identify Image Files
  2. import sys
  3. import Image
  4. for infile in sys.argv[1:]:
  5. try:
  6. im = Image.open(infile)
  7. print infile, im.format, "%dx%d" % im.size, im.mode
  8. except IOError:
  9. pass
复制代码

板凳
Lisrelchen 发表于 2016-8-18 23:57:03
  1. Example: Rolling an image
  2. def roll(image, delta):
  3. "Roll an image sideways"
  4. xsize, ysize = image.size
  5. delta = delta % xsize
  6. if delta == 0: return image
  7. part1 = image.crop((0, 0, delta, ysize))
  8. part2 = image.crop((delta, 0, xsize, ysize))
  9. image.paste(part2, (0, 0, xsize-delta, ysize))
  10. image.paste(part1, (xsize-delta, 0, xsize, ysize))
  11. return image
复制代码

报纸
Lisrelchen 发表于 2016-8-18 23:58:09
  1. Example: Splitting and merging bands
  2. r, g, b = im.split()
  3. im = Image.merge("RGB", (b, g, r))
复制代码

地板
Lisrelchen 发表于 2016-8-19 00:00:28
  1. Example: Transposing an image
  2. out = im.transpose(Image.FLIP_LEFT_RIGHT)
  3. out = im.transpose(Image.FLIP_TOP_BOTTOM)
  4. out = im.transpose(Image.ROTATE_90)
  5. out = im.transpose(Image.ROTATE_180)
  6. out = im.transpose(Image.ROTATE_270)
复制代码

7
mike68097 发表于 2016-8-22 22:52:50

8
飞鸿惊鸿 发表于 2016-8-25 11:03:03
感谢分享

9
cgtutorial 发表于 2016-9-26 18:21:08
撒子东西防城港vhbjknml,;lmknbh

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-30 19:43