Kevin Murray
4160a67a42
[skimage.io.tests] add truncated jpg imread tests
2014-06-30 19:35:35 +10:00
Kevin Murray
83d0717986
[test_freeimage] Allow ValueError to be raised
...
With the truncated image, sometimes ValueError is raised. This allows
either RuntimeError (i.e. libfreeimage error) or ValueError to be
raised.
2014-06-30 18:47:31 +10:00
Kevin Murray
7d9f9c46d9
[test_freeimage.py] remove extraneous statements
2014-06-30 14:45:51 +10:00
Kevin Murray
d69cdb951b
[freeimage tests] Add a test w/ truncated image
...
This tests tests the fix in the previous commit b9a7445 , covering the
issue noted in issue #1037 .
2014-06-30 14:45:51 +10:00
Kevin Murray
b9a7445296
[skimg.io._plugins.freeimage_plugin] fix segfault
...
I have moved the freeimage error handler callback function to the module
namespace to prevent it being garbage collected. See the following for
more info on this quirk of ctypes:
http://stackoverflow.com/questions/12995925/how-to-prevent-functype-from-being-collected
https://github.com/JohannesBuchner/PyMultiNest/issues/5
This also changes the way FreeImage errors are handled. If an exception
is raised in a callback, it will not propagate beyond ctypes internals.
Now, we use a callback that sets a global variable to indicate error. We
then check for error and reset the error string to NULL every time the
C api is called. This is the only way we can both:
a) Not segfault on freeimage error
b) Pass the freeimage error to the user
c) raise RuntimeError()
2014-06-27 21:26:58 +10:00
Thomas Robitaille
9ecbc6ef58
Use Astropy by default if possible
2014-04-22 16:39:07 +02:00
François Boulogne
ba11683d45
update info about PIL
2014-04-03 19:56:02 -04:00
Johannes Schönberger
726ba6d101
Temporarily remove video plugin
...
The video plugin is broken in its current state. It might come back at a later
time, when the Python bindings to gstreamer are up-to-date again.
2014-03-27 09:06:58 -04:00
cgohlke
5403e7a61e
Use os.pathsep to sepatate multiple ImageCollection load_pattern
...
The colon `:` does not work on Windows as it can be part of a path
2014-03-10 22:50:00 -07:00
Johannes Schönberger
181d030952
Remove six copy in _shared as it is a required dependency
2014-02-23 20:42:40 -05:00
Stefan van der Walt
b71008a135
Fix Image.frombytes for older version of Python/PIL
2014-02-12 12:59:51 +02:00
Stefan van der Walt
c930133982
Use frombytes instead of fromstring on PIL images, since the latter is now deprecated
2014-02-12 12:17:26 +02:00
Tony S Yu
e0dafcf004
Clean up test
2014-01-14 23:27:23 -06:00
Tony S Yu
25e349d416
Remove outdated function
2014-01-14 23:15:45 -06:00
Tony S Yu
07f2656975
Factor out function injection
2014-01-14 23:09:27 -06:00
Tony S Yu
19102510ce
Move wrapper function
2014-01-14 23:09:27 -06:00
Tony S Yu
8a4c5ce354
Add comments about how plugins are managed.
2014-01-14 23:09:27 -06:00
Tony S Yu
0f78de46e5
Add dynamic creation of imread_collection function
2014-01-14 23:09:26 -06:00
Tony S Yu
d7cf60ef0b
Attempt to fix failing test on Python 3 buildbot
2013-12-07 11:45:37 -06:00
Tony S Yu
f7fa4049f5
Test null plugin
2013-12-07 10:41:03 -06:00
Tony S Yu
b715b79c31
Test Image._repr_png_
2013-12-07 10:26:56 -06:00
Tony S Yu
f04e14272f
Fix doctest which causes side-effects.
...
I'm not sure that there's a safe way to write this example as a doctest,
but I think this will pass on Travis (although it still has side-effects.
2013-12-07 01:07:17 -06:00
Tony S Yu
6a751045f1
Un-revert commits added to test Travis CI failures
2013-12-07 01:04:40 -06:00
Tony S Yu
27bab63900
Un-revert "Fix failing doctest on systems w/o PIL" commit
2013-12-07 00:22:34 -06:00
Tony S Yu
c09f1bfd32
Revert previous 3 commits to test Travis CI failures.
2013-12-07 00:01:32 -06:00
Tony S Yu
99c5ba409a
Slight clean up of tests
2013-12-06 23:43:56 -06:00
Tony S Yu
c329ff14bc
Fix failing doctest on systems w/o PIL
2013-12-06 22:40:37 -06:00
Tony S Yu
0f88bed41d
Remove inherited config and file-type-specific code.
...
This functionality needs to fleshed out a bit more. This commit can be
reverted after the initial refactor PR.
2013-12-06 22:40:25 -06:00
Tony S Yu
e59daf474c
Modest attempt at normalizing file extensions
2013-12-05 23:38:13 -06:00
Tony S Yu
99aa5a8238
Move io._plugins.plugin to io.manage_plugins
2013-12-05 23:19:47 -06:00
Tony S Yu
0922ccf923
Refactor load_preferred_plugins
2013-12-05 23:19:47 -06:00
Tony S Yu
ac4eb5ae7b
Make preferred_plugins a dict
2013-12-05 23:19:47 -06:00
Tony S Yu
6994bc53b9
Add test for loading preferred plugins.
2013-12-05 23:19:47 -06:00
Tony S Yu
860c6b5cb5
Use InheritedConfig for plugin_store
2013-12-05 23:19:46 -06:00
Tony S Yu
f1dce4be9d
Change plugin_store to use InheritedConfig
2013-12-05 23:19:46 -06:00
Tony S Yu
fabe4fa0cc
Move tests to separate file.
2013-12-05 23:19:46 -06:00
Tony S Yu
e04066de7e
Change InheritedConfig so a key is contained if a parent key is contained
2013-12-05 23:19:46 -06:00
Tony S Yu
db45127fa9
Fix test so it doesn't have side-effects
2013-12-05 23:19:46 -06:00
Tony S Yu
90f1e791d8
PEP8
2013-12-05 23:19:46 -06:00
Tony S Yu
318781bca1
Add test that error gets raised when no plugin available
2013-12-05 23:19:45 -06:00
Tony S Yu
86abc7c970
Factor out url handling for unified file/url behavior
2013-12-05 23:19:45 -06:00
Tony S Yu
41e62fa087
Add comment for clarification
2013-12-05 23:19:45 -06:00
Tony S Yu
8a2e88241e
Factor out config-file parsing for clarity
2013-12-05 23:19:45 -06:00
Tony S Yu
77ff0615d9
Fix wrapping of plugin descriptions
2013-12-05 23:19:45 -06:00
Tony S Yu
1d39961757
Minor rename
2013-12-05 23:19:45 -06:00
Tony S Yu
a23e31b553
Factor out table formatting code.
2013-12-05 23:19:45 -06:00
Tony S Yu
f8ea426608
Refactor io doc building code
2013-12-05 23:19:44 -06:00
Tony S Yu
552f24be8e
Remove unnecessary initialization
2013-12-05 23:19:44 -06:00
Tony S Yu
c820699cd8
Remove unnecessary class
2013-12-05 23:19:44 -06:00
Tony S Yu
79587eaf48
Remove debugging statement
2013-12-05 23:19:44 -06:00