mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-04 11:55:05 +08:00
Merge pull request #63 from amueller/matplolib_plugin
Use matplotlib plugin for I/O if PIL is not available.
This commit is contained in:
@@ -15,7 +15,6 @@ def test_camera():
|
||||
def test_checkerboard():
|
||||
""" Test that checkerboard image can be loaded. """
|
||||
checkerboard = data.checkerboard()
|
||||
assert_equal(checkerboard.dtype, np.uint8)
|
||||
|
||||
if __name__ == "__main__":
|
||||
from numpy.testing import run_module_suite
|
||||
|
||||
@@ -7,14 +7,15 @@ The following plug-ins are available:
|
||||
from _plugins import use as use_plugin
|
||||
from _plugins import available as plugins
|
||||
from _plugins import info as plugin_info
|
||||
|
||||
available_plugins = plugins()
|
||||
|
||||
for preferred_plugin in \
|
||||
['pil', 'matplotlib', 'gtk', 'freeimage', 'qt', 'null']:
|
||||
for preferred_plugin in ['pil', 'matplotlib', 'qt', 'null']:
|
||||
if preferred_plugin in available_plugins:
|
||||
use_plugin(preferred_plugin)
|
||||
break
|
||||
try:
|
||||
use_plugin(preferred_plugin)
|
||||
break
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
from sift import *
|
||||
from collection import *
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
__all__ = ['imread', 'imread_collection']
|
||||
|
||||
import numpy as np
|
||||
import scikits.image.io as io
|
||||
|
||||
try:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[matplotlib]
|
||||
description = Display or save images using Matplotlib
|
||||
provides = imshow, _app_show
|
||||
provides = imshow, imread, _app_show
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from matplotlib.pyplot import imshow, show
|
||||
from matplotlib.pyplot import imshow, show, imread
|
||||
|
||||
def _app_show():
|
||||
show()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user