From: Michael R. Crusoe <crusoe@debian.org>
Subject: Replaced deprecated/removed imghdr with puremagic package
Forwarded: https://github.com/enthought/mayavi/pull/1319

It was deprecated in Python 3.11 and removed in Python 3.13

https://peps.python.org/pep-0594/#deprecated-modules

--- mayavi2.orig/mayavi/tools/remote/remote_widget.py
+++ mayavi2/mayavi/tools/remote/remote_widget.py
@@ -1,4 +1,4 @@
-import imghdr
+import puremagic
 
 
 class RemoteWidget(object):
@@ -50,7 +50,7 @@
 
     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 ##########
