Add RGBA image

This commit is contained in:
François Boulogne
2016-07-17 14:10:01 +02:00
parent f292717dac
commit 449bd445fc
3 changed files with 25 additions and 10 deletions
+18 -10
View File
@@ -16,21 +16,22 @@ from ._binary_blobs import binary_blobs
from .. import img_as_bool
__all__ = ['load',
'astronaut',
'camera',
'lena',
'text',
'checkerboard',
'chelsea',
'clock',
'coffee',
'coins',
'horse',
'hubble_deep_field',
'immunohistochemistry',
'lena',
'logo',
'moon',
'page',
'horse',
'clock',
'immunohistochemistry',
'chelsea',
'coffee',
'hubble_deep_field',
'rocket',
'astronaut']
'text',
'rocket']
def load(f, as_grey=False):
@@ -142,6 +143,13 @@ def coins():
return load("coins.png")
def logo():
"""Scikit-image logo, a RGBA image.
"""
return load("logo.png")
def moon():
"""Surface of the moon.
Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

+7
View File
@@ -57,6 +57,13 @@ def test_immunohistochemistry():
data.immunohistochemistry()
def test_logo():
""" Test that "logo" image can be loaded. """
logo = data.logo()
assert_equal(logo.ndim, 3)
assert_equal(logo.shape[2], 4)
def test_moon():
""" Test that "moon" image can be loaded. """
data.moon()