mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-31 10:30:00 +03:00
Use "from PIL import Imagexx" instead of "import Imagexx"
This commit is contained in:
parent
065f59f04d
commit
2b54c9959e
|
@ -8,6 +8,7 @@ how to run
|
||||||
wget http://upload.wikimedia.org/wikipedia/commons/6/69/Captcha.jpg -O image_resources/captcha.jpg
|
wget http://upload.wikimedia.org/wikipedia/commons/6/69/Captcha.jpg -O image_resources/captcha.jpg
|
||||||
python crop/crop.py
|
python crop/crop.py
|
||||||
|
|
||||||
|
|
||||||
## Build it on Mac OS X 10.6.*
|
## Build it on Mac OS X 10.6.*
|
||||||
|
|
||||||
Build an egg for i386 with Python 2.5/Python 2.6
|
Build an egg for i386 with Python 2.5/Python 2.6
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import os
|
import os
|
||||||
import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
|
||||||
PWD = os.path.dirname(os.path.realpath(__file__))
|
PWD = os.path.dirname(os.path.realpath(__file__))
|
||||||
parent_path = os.path.dirname(PWD)
|
parent_path = os.path.dirname(PWD)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import os
|
import os
|
||||||
import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
|
||||||
PWD = os.path.dirname(os.path.realpath(__file__))
|
PWD = os.path.dirname(os.path.realpath(__file__))
|
||||||
parent_path = os.path.dirname(PWD)
|
parent_path = os.path.dirname(PWD)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import os
|
import os
|
||||||
import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
|
||||||
PWD = os.path.dirname(os.path.realpath(__file__))
|
PWD = os.path.dirname(os.path.realpath(__file__))
|
||||||
parent_path = os.path.dirname(PWD)
|
parent_path = os.path.dirname(PWD)
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import os
|
import os
|
||||||
import Image
|
from PIL import Image
|
||||||
import ImageDraw
|
from PIL import ImageDraw
|
||||||
|
|
||||||
|
|
||||||
PWD = os.path.dirname(os.path.realpath(__file__))
|
PWD = os.path.dirname(os.path.realpath(__file__))
|
||||||
parent_path = os.path.dirname(PWD)
|
parent_path = os.path.dirname(PWD)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import os
|
import os
|
||||||
import Image
|
from PIL import Image
|
||||||
import ImageDraw
|
from PIL import ImageDraw
|
||||||
|
|
||||||
|
|
||||||
PWD = os.path.dirname(os.path.realpath(__file__))
|
PWD = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import os
|
import os
|
||||||
import Image
|
from PIL import Image
|
||||||
import ImageDraw
|
from PIL import ImageDraw
|
||||||
|
|
||||||
|
|
||||||
PWD = os.path.dirname(os.path.realpath(__file__))
|
PWD = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import os
|
import os
|
||||||
import Image
|
from PIL import Image
|
||||||
import ImageDraw
|
from PIL import ImageDraw
|
||||||
|
|
||||||
|
|
||||||
PWD = os.path.dirname(os.path.realpath(__file__))
|
PWD = os.path.dirname(os.path.realpath(__file__))
|
||||||
parent_path = os.path.dirname(PWD)
|
parent_path = os.path.dirname(PWD)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import os
|
import os
|
||||||
import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
|
||||||
PWD = os.path.dirname(os.path.realpath(__file__))
|
PWD = os.path.dirname(os.path.realpath(__file__))
|
||||||
parent_path = os.path.dirname(PWD)
|
parent_path = os.path.dirname(PWD)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import os
|
import os
|
||||||
import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
|
||||||
PWD = os.path.dirname(os.path.realpath(__file__))
|
PWD = os.path.dirname(os.path.realpath(__file__))
|
||||||
parent_path = os.path.dirname(PWD)
|
parent_path = os.path.dirname(PWD)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import os
|
import os
|
||||||
import Image, ImageDraw
|
from PIL import Image
|
||||||
|
from PIL import ImageDraw
|
||||||
|
|
||||||
|
|
||||||
PWD = os.path.dirname(os.path.realpath(__file__))
|
PWD = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
@ -13,16 +14,10 @@ WHITE = 255
|
||||||
|
|
||||||
im = Image.open(fp = file_path)
|
im = Image.open(fp = file_path)
|
||||||
w, h = im.size[0], im.size[1]
|
w, h = im.size[0], im.size[1]
|
||||||
|
|
||||||
print "width:", w
|
|
||||||
print "high:", h
|
|
||||||
|
|
||||||
|
|
||||||
im = im.draft("L", im.size)
|
im = im.draft("L", im.size)
|
||||||
|
|
||||||
pixsels = im.load()
|
pixsels = im.load()
|
||||||
|
|
||||||
|
|
||||||
for x in range(w):
|
for x in range(w):
|
||||||
for y in range(h):
|
for y in range(h):
|
||||||
if pixsels[x, y] > 128:
|
if pixsels[x, y] > 128:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import os
|
import os
|
||||||
import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
|
||||||
PWD = os.path.dirname(os.path.realpath(__file__))
|
PWD = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import os
|
import os
|
||||||
import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
|
||||||
PWD = os.path.dirname(os.path.realpath(__file__))
|
PWD = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import os
|
import os
|
||||||
import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
|
||||||
PWD = os.path.dirname(os.path.realpath(__file__))
|
PWD = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user