PIL 1.1.6...รอ ร้อ รอ เฝ้าแต่รอ
load
im.load()
Allocates storage for the image and loads it from the file (or from the source, for lazy operations). In normal cases, you don't need to call this method, since the Image class automatically loads an opened image when it is accessed for the first time.
(New in 1.1.6) In 1.1.6 and later, load returns a pixel access object that can be used to read and modify pixels. The access object behaves like a 2-dimensional array, so you can do:
pix = im.load()
print pix[x, y]
pix[x, y] = value
Access via this object is a lot faster than getpixel and putpixel.
from http://www.effbot.org/im.load()
Allocates storage for the image and loads it from the file (or from the source, for lazy operations). In normal cases, you don't need to call this method, since the Image class automatically loads an opened image when it is accessed for the first time.
(New in 1.1.6) In 1.1.6 and later, load returns a pixel access object that can be used to read and modify pixels. The access object behaves like a 2-dimensional array, so you can do:
pix = im.load()
print pix[x, y]
pix[x, y] = value
Access via this object is a lot faster than getpixel and putpixel.
อยากใช้เร็วๆ หง่า คงเร็วอย่างที่เขาพูด แล้วอาจจะไม่ต้อง implement project ใน C ด้วย
ตอนนี้ยังเป็น alpha อยู่เลย
No comments:
Post a Comment