Use "from PIL import Imagexx" instead of "import Imagexx"

This commit is contained in:
Shuge Lee 2013-01-16 11:53:53 +08:00
parent 065f59f04d
commit 2b54c9959e
14 changed files with 26 additions and 23 deletions

View File

@ -8,6 +8,7 @@ how to run
wget http://upload.wikimedia.org/wikipedia/commons/6/69/Captcha.jpg -O image_resources/captcha.jpg
python crop/crop.py
## Build it on Mac OS X 10.6.*
Build an egg for i386 with Python 2.5/Python 2.6

View File

@ -1,6 +1,7 @@
#!/usr/bin/env python
import os
import Image
from PIL import Image
PWD = os.path.dirname(os.path.realpath(__file__))
parent_path = os.path.dirname(PWD)

View File

@ -1,6 +1,7 @@
#!/usr/bin/env python
import os
import Image
from PIL import Image
PWD = os.path.dirname(os.path.realpath(__file__))
parent_path = os.path.dirname(PWD)

View File

@ -1,6 +1,7 @@
#!/usr/bin/env python
import os
import Image
from PIL import Image
PWD = os.path.dirname(os.path.realpath(__file__))
parent_path = os.path.dirname(PWD)

View File

@ -1,7 +1,8 @@
#!/usr/bin/env python
import os
import Image
import ImageDraw
from PIL import Image
from PIL import ImageDraw
PWD = os.path.dirname(os.path.realpath(__file__))
parent_path = os.path.dirname(PWD)

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python
import os
import Image
import ImageDraw
from PIL import Image
from PIL import ImageDraw
PWD = os.path.dirname(os.path.realpath(__file__))

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python
import os
import Image
import ImageDraw
from PIL import Image
from PIL import ImageDraw
PWD = os.path.dirname(os.path.realpath(__file__))

View File

@ -1,7 +1,8 @@
#!/usr/bin/env python
import os
import Image
import ImageDraw
from PIL import Image
from PIL import ImageDraw
PWD = os.path.dirname(os.path.realpath(__file__))
parent_path = os.path.dirname(PWD)

View File

@ -1,6 +1,7 @@
#!/usr/bin/env python
import os
import Image
from PIL import Image
PWD = os.path.dirname(os.path.realpath(__file__))
parent_path = os.path.dirname(PWD)

View File

@ -1,6 +1,7 @@
#!/usr/bin/env python
import os
import Image
from PIL import Image
PWD = os.path.dirname(os.path.realpath(__file__))
parent_path = os.path.dirname(PWD)

View File

@ -1,6 +1,7 @@
#!/usr/bin/env python
import os
import Image, ImageDraw
from PIL import Image
from PIL import ImageDraw
PWD = os.path.dirname(os.path.realpath(__file__))
@ -13,16 +14,10 @@ WHITE = 255
im = Image.open(fp = file_path)
w, h = im.size[0], im.size[1]
print "width:", w
print "high:", h
im = im.draft("L", im.size)
pixsels = im.load()
for x in range(w):
for y in range(h):
if pixsels[x, y] > 128:

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
import os
import Image
from PIL import Image
PWD = os.path.dirname(os.path.realpath(__file__))

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
import os
import Image
from PIL import Image
PWD = os.path.dirname(os.path.realpath(__file__))

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
import os
import Image
from PIL import Image
PWD = os.path.dirname(os.path.realpath(__file__))