8000 Reset the available animation movie writer on rcParam change by jankatins · Pull Request #5628 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Reset the available animation movie writer on rcParam change #5628

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Feb 7, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add comment to explain the fix in ImageMagickBase
  • Loading branch information
jankatins committed Feb 7, 2016
commit e7838671ea8f26065ca0927235dd8a3b319d94b2
14 changes: 12 additions & 2 deletions lib/matplotlib/animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,9 @@ def _init_from_registry(cls):
@classmethod
def isAvailable(cls):
'''
Check to see if a MovieWriter subclass is actually available by
Check to see if a ImageMagickWriter is actually available

Done by first checking the windows registry (if applicable) and then
running the commandline tool.
'''
bin_path = cls.bin_path()
Expand All @@ -667,8 +669,12 @@ def isAvailable(cls):
ImageMagickBase._init_from_registry()


# Note: the base classes need to be in that order to get
# isAvailable() from ImageMagickBase called and not the
# one from MovieWriter. The latter is then called by the
# former.
@writers.register('imagemagick')
class ImageMagickWriter(ImageMagickBase, MovieWriter, ):
class ImageMagickWriter(ImageMagickBase, MovieWriter):
def _args(self):
return ([self.bin_path(),
'-size', '%ix%i' % self.frame_size, '-depth', '8',
Expand All @@ -677,6 +683,10 @@ def _args(self):
+ self.output_args)


# Note: the base classes need to be in that order to get
# isAvailable() from ImageMagickBase called and not the
# one from MovieWriter. The latter is then called by the
# former.
@writers.register('imagemagick_file')
class ImageMagickFileWriter(ImageMagickBase, FileMovieWriter):
supported_formats = ['png', 'jpeg', 'ppm', 'tiff', 'sgi', 'bmp',
Expand Down
0