Merge pull request #63 from amueller/matplolib_plugin

Use matplotlib plugin for I/O if PIL is not available.
This commit is contained in:
Stefan van der Walt
2011-10-18 12:05:19 -07:00
5 changed files with 8 additions and 10 deletions
-1
View File
@@ -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
+6 -5
View File
@@ -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
View File
@@ -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()