Merge branch 'issue256' into devel
This commit is contained in:
commit
385f4f32a2
3 changed files with 18 additions and 5 deletions
|
|
@ -38,14 +38,19 @@ except:
|
||||||
|
|
||||||
|
|
||||||
# The Cinema2K/4K tests seem to need the freeimage backend to skimage.io
|
# The Cinema2K/4K tests seem to need the freeimage backend to skimage.io
|
||||||
# in order to work.
|
# in order to work. Unfortunately, scikit-image/freeimage is about as wonky as
|
||||||
|
# it gets. Anaconda can get totally weirded out on versions up through 3.6.4
|
||||||
|
# on Python3 with scikit-image up through version 0.10.0.
|
||||||
|
NO_SKIMAGE_FREEIMAGE_SUPPORT = False
|
||||||
try:
|
try:
|
||||||
|
import skimage
|
||||||
import skimage.io
|
import skimage.io
|
||||||
if 'freeimage' in skimage.io.find_available_plugins(loaded=True).keys():
|
if (((sys.hexversion >= 0x03000000) and
|
||||||
skimage.io.use_plugin('freeimage', 'imread')
|
('Anaconda' in sys.version) and
|
||||||
NO_SKIMAGE_FREEIMAGE_SUPPORT = False
|
(re.match('0.10', skimage.__version__)))):
|
||||||
else:
|
|
||||||
NO_SKIMAGE_FREEIMAGE_SUPPORT = True
|
NO_SKIMAGE_FREEIMAGE_SUPPORT = True
|
||||||
|
else:
|
||||||
|
skimage.io.use_plugin('freeimage', 'imread')
|
||||||
except ((ImportError, RuntimeError)):
|
except ((ImportError, RuntimeError)):
|
||||||
NO_SKIMAGE_FREEIMAGE_SUPPORT = True
|
NO_SKIMAGE_FREEIMAGE_SUPPORT = True
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,10 @@ import unittest
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
try:
|
||||||
|
import skimage.io
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
|
||||||
from .fixtures import OPJ_DATA_ROOT, opj_data_file, read_image
|
from .fixtures import OPJ_DATA_ROOT, opj_data_file, read_image
|
||||||
from .fixtures import NO_READ_BACKEND, NO_READ_BACKEND_MSG
|
from .fixtures import NO_READ_BACKEND, NO_READ_BACKEND_MSG
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,10 @@ import unittest
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
try:
|
||||||
|
import skimage.io
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
|
||||||
from .fixtures import read_image, NO_READ_BACKEND, NO_READ_BACKEND_MSG
|
from .fixtures import read_image, NO_READ_BACKEND, NO_READ_BACKEND_MSG
|
||||||
from .fixtures import OPJ_DATA_ROOT, NO_SKIMAGE_FREEIMAGE_SUPPORT
|
from .fixtures import OPJ_DATA_ROOT, NO_SKIMAGE_FREEIMAGE_SUPPORT
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue