From 7c19250810098cc614f427a95036e9388503bf57 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Sun, 24 Jun 2012 17:00:36 -0700 Subject: [PATCH] BUG: Use PIL as the default image loader. --- skimage/io/__init__.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/skimage/io/__init__.py b/skimage/io/__init__.py index 4df5de34..dc629be6 100644 --- a/skimage/io/__init__.py +++ b/skimage/io/__init__.py @@ -32,12 +32,14 @@ def _load_preferred_plugins(): break except (ImportError, RuntimeError): pass -# Use PIL as the default imread plugin, since matplotlib (1.2.x) -# is buggy (flips PNGs around, returns bytes as floats, etc.) -try: - use_plugin('pil', 'imread') -except ImportError: - pass + + # Use PIL as the default imread plugin, since matplotlib (1.2.x) + # is buggy (flips PNGs around, returns bytes as floats, etc.) + try: + use_plugin('pil', 'imread') + except ImportError: + pass + _load_preferred_plugins()