diff --git a/mayavi/__init__.py b/mayavi/__init__.py index 27c028128..08502380b 100644 --- a/mayavi/__init__.py +++ b/mayavi/__init__.py @@ -18,7 +18,8 @@ 'traitsui>=7.0.0', 'packaging', 'importlib_resources; python_version<"3.11"', - 'vtk' + 'vtk', + 'puremagic' ] __extras_require__ = { diff --git a/mayavi/tools/remote/remote_widget.py b/mayavi/tools/remote/remote_widget.py index ea6498324..213928919 100644 --- a/mayavi/tools/remote/remote_widget.py +++ b/mayavi/tools/remote/remote_widget.py @@ -1,4 +1,4 @@ -import imghdr +import puremagic class RemoteWidget(object): @@ -50,7 +50,7 @@ def show_image(self, data, format='PNG'): def _update_image(self): data = self.scene_proxy.get_raw_image() - format = imghdr.what('', h=data) + format = puremagic.what('', h=data) self.show_image(data, format=format.upper()) # ##### VTK Event handling ##########