diff --git a/Demos/README.md b/Demos/README.md index d3c943aa2..dbcd4afd5 100644 --- a/Demos/README.md +++ b/Demos/README.md @@ -6,7 +6,7 @@ how to run [ -d image_resources ] || mkdir image_resources wget http://upload.wikimedia.org/wikipedia/commons/6/69/Captcha.jpg -O image_resources/captcha.jpg - python crop/croip.py + python crop/crop.py ## Build it on Mac OS X 10.6.* diff --git a/Demos/access_pixels/access_pixels.py b/Demos/access_pixels/access_pixels.py index b32caea28..56ae56923 100644 --- a/Demos/access_pixels/access_pixels.py +++ b/Demos/access_pixels/access_pixels.py @@ -22,8 +22,8 @@ def print_im(im, w=None, h=None): else: pixels = im - for x in xrange(w): - for y in xrange(h): + for x in range(w): + for y in range(h): if pixels[x, y] > 128: print " ", diff --git a/Demos/histogram/histogram.py b/Demos/histogram/histogram.py index ad011bab4..c533aea18 100644 --- a/Demos/histogram/histogram.py +++ b/Demos/histogram/histogram.py @@ -23,8 +23,8 @@ im = im.draft("L", im.size) pixsels = im.load() -for x in xrange(w): - for y in xrange(h): +for x in range(w): + for y in range(h): if pixsels[x, y] > 128: pixsels[x, y] = WHITE else: @@ -32,8 +32,8 @@ for x in xrange(w): counts = [] -for x in xrange(w): - count = len([1 for y in xrange(h) +for x in range(w): + count = len([1 for y in range(h) if pixsels[x, y] is BLACK]) counts.append(count)