text: Title: Fedora 41 compatibility — imghdr removed with python 3.13.
  Body: ### AutoKey is a Xorg application and will not function in a Wayland session. Do you use Xorg (X11) or Wayland?
  
  Xorg
  
  ### Has this issue already been reported?
  
  - [X] I have searched through the existing issues.
  
  ### Is this a question rather than an issue?
  
  - [X] This is not a question.
  
  ### What type of issue is this?
  
  None
  
  ### Choose one or more terms that describe this issue:
  
  - [ ] autokey triggers
  - [X] autokey-gtk
  - [X] autokey-qt
  - [ ] beta
  - [ ] bug
  - [ ] critical
  - [ ] development
  - [ ] documentation
  - [X] enhancement
  - [X] installation/configuration
  - [ ] phrase expansion
  - [ ] scripting
  - [X] technical debt
  - [ ] user interface
  
  ### Other terms that describe this issue if not provided above:
  
  fedora python fc41 imghdr
  
  ### Which Linux distribution did you use?
  
  Moving to fedora 41 introduced a fresh error for me: ModuleNotFoundError: No module named 'imghdr'
  
  Python 3.13 no longer includes imghdr which at least in my context, prevented autokey-gtk / autokey-qt from starting. I suspect any autokey install on a distribution that's moving towards python 3.13 will want to implement this (with some research, there may be better ways. I'm a novice). 
  
  For my own setup this worked:
  
  I've swapped out the imghdr-reliant code for imagesize — specifically within: 
  /usr/lib/python3.13/site-packages/autokey/scripting/highlevel.py:
  
  Lines 66=>78:
  
  I switched out:
  
  ```
  def get_png_dim(filepath: str) -> int:
      """
      Usage: C{get_png_dim(filepath:str) -> (int)}
  
      Finds the dimension of a PNG.
      @param filepath: file path of the PNG.
      @returns: (width, height).
      @raise Exception: Raised if the file is not a png
      """
      if not imghdr.what(filepath) == 'png':
          raise Exception("not PNG")
      head = open(filepath, 'rb').read(24)
      return struct.unpack('!II', head[16:24])
  ```
  
  to:
  ```
  def get_png_dim(filepath: str) -> tuple[int, int]:
      """
      Usage: get_png_dim(filepath:str) -> (width: int, height: int)
      Finds the dimension of a PNG.
      @param filepath: file path of the PNG.
      @returns: tuple of (width, height).
      @raise Exception: Raised if the file is not a png
      """
      # Check if file exists
      if not os.path.isfile(filepath):
          raise Exception("File does not exist")
          
      # Check if file is PNG using python-magic
      file_type = magic.from_file(filepath, mime=True)
      if file_type != 'image/png':
          raise Exception("not PNG")
      
      # Get dimensions using imagesize
      try:
          width, height = imagesize.get(filepath)
          return width, height
      except:
          raise Exception("Could not determine PNG dimensions")
  ```
   At the top, replaced 'import imghdr' with 'import imagesize'
   & then 'pip install imagesize'.
   
   Afterwards, autokey should startup like normal.
   
   Including the original error just in case it helps folks find this:
   Traceback (most recent call last):
   ```
    File "/usr/bin/autokey-gtk", line 33, in <module>
      sys.exit(load_entry_point('autokey==0.96.0', 'console_scripts', 'autokey-gtk')())
               ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/bin/autokey-gtk", line 25, in importlib_load_entry_point
      return next(matches).load()
             ~~~~~~~~~~~~~~~~~~^^
    File "/usr/lib64/python3.13/importlib/metadata/__init__.py", line 179, in load
      module = import_module(match.group('module'))
    File "/usr/lib64/python3.13/importlib/__init__.py", line 88, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
             ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
    File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
    File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
    File "<frozen importlib._bootstrap_external>", line 1022, in exec_module
    File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
    File "/usr/lib/python3.13/site-packages/autokey/gtkui/__main__.py", line 4, in <module>
      from autokey.gtkapp import Application
    File "/usr/lib/python3.13/site-packages/autokey/gtkapp.py", line 39, in <module>
      from autokey import service, monitor
    File "/usr/lib/python3.13/site-packages/autokey/service.py", line 36, in <module>
      import autokey.scripting
    File "/usr/lib/python3.13/site-packages/autokey/scripting/__init__.py", line 24, in <module>
      from . import highlevel
    File "/usr/lib/python3.13/site-packages/autokey/scripting/highlevel.py", line 9, in <module>
      import imghdr
  ModuleNotFoundError: No module named 'imghdr'
  ```
   
  
  
  
  
  ### Which AutoKey GUI did you use?
  
  Both
  
  ### Which AutoKey version did you use?
  
  _No response_
  
  ### How did you install AutoKey?
  
  _No response_
  
  ### Can you briefly describe the issue?
  
  Autokey on fedora 41 won't start due to missing imghdr python module.
  
  ### Can the issue be reproduced?
  
  Always
  
  ### What are the steps to reproduce the issue?
  
  _No response_
  
  ### What should have happened?
  
  _No response_
  
  ### What actually happened?
  
  _No response_
  
  ### Do you have screenshots?
  
  _No response_
  
  ### Can you provide the output of the AutoKey command?
  
  _No response_
  
  ### Anything else?
  
  _No response_
  <br/>
  <hr/>
  
  <details><summary>This repo is using Opire - what does it mean? 👇</summary><br/>💵 Everyone can add rewards for this issue commenting <code>/reward 100</code> (replace <code>100</code> with the amount).<br/>🕵️‍♂️ If someone starts working on this issue to earn the rewards, they can comment <code>/try</code> to let everyone know!<br/>🙌 And when they open the PR, they can comment <code>/claim #961</code> either in the PR description or in a PR's comment.<br/><br/>🪙 Also, everyone can tip any user commenting <code>/tip 20 @markallasread</code> (replace <code>20</code> with the amount, and <code>@markallasread</code> with the user to tip).<br/><br/>📖 If you want to learn more, check out our <a href="https://docs.opire.dev">documentation</a>.</details>