Replace use of elephant pic with Chelsea the cat

This commit is contained in:
Tony S Yu
2013-10-21 23:02:49 -05:00
parent 51c3d23b2e
commit d177aa6c16
4 changed files with 9 additions and 9 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 KiB

+4 -4
View File
@@ -25,21 +25,21 @@ Example
We can create a Picture object open opening an image file
>>> from skimage import novice
>>> from skimage import data
>>> picture = novice.open(data.data_dir + '/elephant.png')
>>> picture = novice.open(data.data_dir + '/chelsea.png')
Pictures know their format
>>> print picture.format
png
... and where they came from
>>> print picture.path.endswith('elephant.png')
>>> print picture.path.endswith('chelsea.png')
True
... and their size
>>> print picture.size
(665, 500)
(451, 300)
>>> print picture.width
665
451
Changing `size` resizes the picture.
>>> picture.size = (200, 250)
+1 -1
View File
@@ -185,7 +185,7 @@ class Picture(object):
Load an image from a file
>>> from skimage import novice
>>> from skimage import data
>>> picture = novice.open(data.data_dir + '/elephant.png')
>>> picture = novice.open(data.data_dir + '/chelsea.png')
Create a blank 100 pixel wide, 200 pixel tall white image
>>> pic = Picture.from_size((100, 200), color=(255, 255, 255))
+4 -4
View File
@@ -8,7 +8,7 @@ from skimage.novice._novice import array_to_xy_origin, xy_to_array_origin
from skimage import data_dir
IMAGE_PATH = os.path.join(data_dir, "elephant.png")
IMAGE_PATH = os.path.join(data_dir, "chelsea.png")
SMALL_IMAGE_PATH = os.path.join(data_dir, "block.png")
@@ -27,9 +27,9 @@ def test_pic_info():
pic = novice.open(IMAGE_PATH)
assert_equal(pic.format, "png")
assert_equal(pic.path, os.path.abspath(IMAGE_PATH))
assert_equal(pic.size, (665, 500))
assert_equal(pic.width, 665)
assert_equal(pic.height, 500)
assert_equal(pic.size, (451, 300))
assert_equal(pic.width, 451)
assert_equal(pic.height, 300)
assert not pic.modified
assert_equal(pic.scale, 1)