Commit 75daf555 authored by Eric Larson's avatar Eric Larson Committed by GitHub

Merge pull request #156 from christianbrodbeck/imageio

[MRG] FIX:  make screenshot() before starting movie
parents 79beb158 b279db23
......@@ -37,6 +37,9 @@ def test_offscreen():
"""
mlab.options.backend = 'auto'
brain = Brain(*std_args, offscreen=True)
# Sometimes the first screenshot is rendered with a different
# resolution on OS X
brain.screenshot()
shot = brain.screenshot()
assert_array_equal(shot.shape, (800, 800, 3))
brain.close()
......
......@@ -2250,6 +2250,9 @@ class Brain(object):
logger.debug("Save movie for time points/samples\n%s\n%s"
% (times, time_idx))
# Sometimes the first screenshot is rendered with a different
# resolution on OS X
self.screenshot()
images = (self.screenshot() for _ in
self._iter_time(time_idx, interpolation))
imageio.mimwrite(fname, images, **kwargs)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment